Breakout Problem Set Javadocs

breakout
Interface Rebounding

All Known Subinterfaces:
Ball
All Known Implementing Classes:
BasicBall

public interface Rebounding

Defines the contract for objects that rebound off of other objects. During the rebound phase of a World tick, resolveBounces() is called with an iterator for the current components on the Board. After this rebound phase, World checks through the Rebounding items again to see if any of them kicked the bucket while the Board iterators were busy(diedWhileRebounding()).


Method Summary
 boolean diedWhileRebounding()
          Called after the rebound phase to see if this object died while it was rebounding.
 void resolveBounces(java.util.Iterator withThese)
          Called to allow moving objects to check itself against the objects in the iterator for intersections, call hit() as necessary, adjust its velocity, etc.
 

Method Detail

resolveBounces

public void resolveBounces(java.util.Iterator withThese)
Called to allow moving objects to check itself against the objects in the iterator for intersections, call hit() as necessary, adjust its velocity, etc.

Parameters:
withThese - Iterator for the objects this Rebounding object should check itself against.

diedWhileRebounding

public boolean diedWhileRebounding()
Called after the rebound phase to see if this object died while it was rebounding.

Returns:
true if it should be removed from the board; false otherwise.

Breakout Problem Set Javadocs