Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class SpaceShip extends Polygon {
- //x and y coordinates
- public static int[] polyXArray = {...};
- public static int[] polyYArray = {...};
- //other class variables
- {...}
- public SpaceShip() {
- super(polyXArray, polyYArray, polyXArray.length);
- }
- }
- public abstract class GameShape extends Polygon {
- //x and y coordinates, still unassigned
- public static int[] polyXArray, polyYArray;
- //other class variables
- {...}
- public GameShape() {
- super(polyXArray, polyYArray, polyXArray.length);
- }
- }
- public abstract class GameShape extends Polygon {
- //x and y coordinates, still unassigned
- public int[] polyXArray, polyYArray;
- //other class variables
- {...}
- public GameShape() {
- instantiatePolyArrays();
- super(polyXArray, polyYArray, polyXArray.length);
- }
- protected abstract void instantiatePolyArrays();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement