Skip to content

Instantly share code, notes, and snippets.

@Unix-Code
Last active November 8, 2015 21:28
Show Gist options
  • Save Unix-Code/a995124fc53696ce2a5c to your computer and use it in GitHub Desktop.
Save Unix-Code/a995124fc53696ce2a5c to your computer and use it in GitHub Desktop.
Game
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
}
}
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