|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.tabacha.cgo.Move de.tabacha.cgo.Jump
A move where the ball jumps.
$Id: Jump.java,v 1.7 2004/07/27 20:50:20 mk Exp $
Field Summary |
Fields inherited from interface de.tabacha.cgo.Constants |
BALL, COL_COUNT, DCOL, DOWN, DROW, E, EMPTY, FIRST_DIRECTION, KICK_OFF_FIELD, LAST_DIRECTION, N, NE, NW, OPPOSITE, PIECE, ROW_COUNT, S, SE, SW, UP, UPSIDEDOWN, W |
Constructor Summary | |
Jump()
Empty Constructor. |
|
Jump(byte[] directions)
Constructor. |
Method Summary | |
java.lang.Object |
clone()
|
boolean |
hasNextLeap()
|
boolean |
isEmpty()
Returns true if this move contains zero jumps. |
byte |
nextLeap()
|
byte |
pop()
Removes and returns the last jump from this move. |
void |
push(byte direction)
Adds a jump to the end of this move. |
int |
size()
Returns the number of leaps of this jump. |
void |
startIteration()
|
java.lang.String |
toString()
|
void |
trimToSize()
Minimize memory usage. |
Move |
upsideDown()
The move returned is exactly this move mirrored along the central row. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Jump()
public Jump(byte[] directions)
directions
- The list of the directions of the subsequent jumps.Method Detail |
public java.lang.Object clone()
public boolean isEmpty()
public int size()
public void trimToSize()
public Move upsideDown()
Move
upsideDown
in class Move
public void startIteration()
public boolean hasNextLeap()
public byte nextLeap()
public byte pop()
public void push(byte direction)
direction
- Where to jump in the endpublic java.lang.String toString()
toString
in class Move
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |