|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BallEnvironment
A BallEnvironment manages the Balls in an associated World. It does so by providing methods that allow Balls to be added and removed to that World, along with other methods that relate to those Balls.
Method Summary | |
---|---|
void |
addBall(Ball ballToAdd)
Adds the given Ball to this BallEnvironment's World. |
boolean |
isInsideWorldX(Point2D p)
Returns true if the given point's x-coordinate is inside this BallEnvironment's World. |
boolean |
isInsideWorldY(Point2D p)
Returns true if the given point's y-coordinate is inside this BallEnvironment's World. |
Point2D |
middleOfWorld()
Returns a new Point2D that is at the middle of this BallEnvironment's World. |
void |
removeBall(Ball ballToRemove)
Removes the given Ball from this BallEnvironment's World. |
Method Detail |
---|
void addBall(Ball ballToAdd)
ballToAdd
- the Ball to add to this BallEnvironment's Worldvoid removeBall(Ball ballToRemove)
ballToRemove
- the Ball to remove from this BallEnvironment's Worldboolean isInsideWorldX(Point2D p)
p
- the point whose x-coordinate to check
boolean isInsideWorldY(Point2D p)
p
- the point whose y-coordinate to check
Point2D middleOfWorld()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |