|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Move
An object of this class represents a move that could be applied to a game state.
Field Summary | |
int |
fx
x-coordinate of square from which piece is being moved, or -1 if new piece is just being placed on the board. |
int |
fy
y-coordinate of square from which piece is being moved, or -1 if new piece is just being placed on the board. |
int |
tx
x-coordinate of square to which piece is being moved. |
int |
ty
y-coordinate of square to which piece is being moved. |
Constructor Summary | |
Move(int tx,
int ty)
Constructs a move representing placing a new game piece at position tx,ty. |
|
Move(int fx,
int fy,
int tx,
int ty)
Constructs a move representing moving a game piece from fx,fy to tx,ty. |
Method Summary | |
boolean |
equals(java.lang.Object o)
Compares the specified object to this move for equality. |
java.lang.String |
toString()
Produces a description of this Move object. |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public int fx
public int fy
public int tx
public int ty
Constructor Detail |
public Move(int tx, int ty)
public Move(int fx, int fy, int tx, int ty)
Method Detail |
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- object to be compared
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |