public class World
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
private Ball |
ball
The ball in the physics world.
|
Constructor and Description |
---|
World()
Constructor to the world.
|
Modifier and Type | Method and Description |
---|---|
int |
getBallX()
Hides the access to the Ball class.
|
int |
getBallY()
Hides the access to the Ball class.
|
void |
run()
The infinite loop that runs the world.
|
void |
updateDirection(Direction direction)
Hides access to the Ball.
|
private Ball ball
public int getBallX()
public int getBallY()
public void run()
run
in interface java.lang.Runnable
public void updateDirection(Direction direction)
direction
- The direction in which to move the ball.