previous
contents
next

The Model: Fields

class Model {
final int BALL_SIZE = 20;
int xPosition = 0; // Where the ball is now int yPosition = 0;
int xLimit, yLimit; // Edges of the window int xDelta = 4; // How fast the ball moves int yDelta = 3;