|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.editev.chess.Move
Represents a move in the game of chess. A move is identified with its start square. There's also a target square, and perhaps a promotion piece. This class is used promiscuously as an interator, perhaps the ultimate reverse of an immutable class.
the source here.| Field Summary | |
byte |
index
Index the move in the series of offsets in the Piece. |
byte |
promotion
What piece is being created if this move is a promotion? Most of the time, Moves are not promotions and this field is wasted. |
Square |
source
The target square that this move is going to. |
Square |
target
The target square that this move is going to. |
| Constructor Summary | |
Move()
|
|
| Method Summary | |
java.lang.Object |
clone()
Clone this Move as an Object. |
Move |
cloneMove()
Clone this Move as a Move. |
void |
copyFrom(Move move)
Copy the contents of another Move into this Move. |
boolean |
equals(java.lang.Object object)
Two Moves are equal if they are equal as squares and their targets are equal as Squares. |
void |
resetPromotion()
Reset the promotion variable to the start. |
java.lang.String |
toString()
Represent the Move as the source and target Squares. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public final Square source
public final Square target
public byte index
public byte promotion
| Constructor Detail |
public Move()
| Method Detail |
public void resetPromotion()
public boolean equals(java.lang.Object object)
public java.lang.Object clone()
public Move cloneMove()
public void copyFrom(Move move)
public java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||