|
Breakout Problem Set Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object breakout.World
World controls Breakout's clock, and manages the different phases of calculation that occur during each unit of time. Once World has been started up, a tick proceeds as follows:
update()
on the list of all BreakoutComponents
obtained from Board.
resolveBounces(Iterator it)
on the list of all
Rebounding components obtained from Board.
diedWhileRebounding()
on the list of all
Rebounding components to clear out any that died during the
rebound phase.
Field Summary | |
static int |
TICK_LENGTH
Time to sleep at the end of each tick |
Constructor Summary | |
World(Board aBoard,
BreakoutUI bui)
Creates a new World with the specified Board and BreakoutUI. |
Method Summary | |
Board |
getBoard()
Gets the Board associated with this World. |
void |
run()
Runs continuously while game is in progress. |
void |
start()
Starts the game, and disables the autolayout "add" method in Board. |
void |
stop()
Stops the game. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int TICK_LENGTH
Constructor Detail |
public World(Board aBoard, BreakoutUI bui)
Method Detail |
public void start()
public void stop()
public void run()
run
in interface java.lang.Runnable
public Board getBoard()
|
Breakout Problem Set Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |