Last active
November 8, 2015 21:28
-
-
Save Unix-Code/a995124fc53696ce2a5c to your computer and use it in GitHub Desktop.
Game
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MovingObj extends Object { | |
int xSpeed, ySpeed; | |
MovingObj() { | |
super(); | |
xSpeed = 1; | |
ySpeed = 1; | |
} | |
MovingObj(float inX, float inY, float inW, float inH, float inXSpeed, float inYSpeed) { | |
super(inX, inY, inW, inH) | |
xSpeed = inXSpeed; | |
ySpeed = inYSpeed; | |
} | |
void | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class Object { | |
float x, y, w, h | |
Object() { | |
x = 0; | |
y = 0; | |
w = 10; | |
h = 10; | |
} | |
Object(float inX, float inY, float inW, float inH) { | |
x = inX; | |
y = inY; | |
w = inW; | |
h = inH; | |
} | |
abstract void display(); | |
abstract void move(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment