|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface WorldDescriber
A WorldDescriber is an object that can describe (return) attributes about itself like its middle point, its Color and Shape (inherited from Drawable), and how an object that has gone outside of this World should bounce.
| Method Summary | |
|---|---|
List<World> |
getAllWorlds()
Returns a List |
World |
getAnotherWorld()
Returns a random other World (or this World if it is the only one). |
boolean |
isInsideWorldX(Point2D p)
Returns true if the given point's x-coordinate is inside this World. |
boolean |
isInsideWorldY(Point2D p)
Returns true if the given point's y-coordinate is inside this World. |
Point2D |
middleOfWorld()
Returns a Point2D that is at the middle of this World. |
Point2D |
randomPointInWorld()
Returns a Point2D that is a random point in this World. |
| Methods inherited from interface ballWorlds.Drawable |
|---|
getColor, getShape |
| Method Detail |
|---|
Point2D middleOfWorld()
Point2D randomPointInWorld()
boolean isInsideWorldX(Point2D p)
p - the point whose x-coordinate is to be checked.
boolean isInsideWorldY(Point2D p)
p - the point whose y-coordinate is to be checked.
World getAnotherWorld()
List<World> getAllWorlds()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||