knockabout.gamemodel
Class Move
java.lang.Object
knockabout.gamemodel.Move
- public class Move
- extends java.lang.Object
KnockAbout Move Object
This object represents a Knockabout game move.
Represents the (x,y) position to move to, as well as the direction of movement.
This class also contains some constants (DIR_XX's) and extra methods(ConvertDir)
for the purpose of mapping integer colors to their string equivalents.
Constructor Summary |
Move(int _x,
int _y,
int _dir)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DIR_NW
public static final int DIR_NW
- See Also:
- Constant Field Values
DIR_NE
public static final int DIR_NE
- See Also:
- Constant Field Values
DIR_W
public static final int DIR_W
- See Also:
- Constant Field Values
DIR_E
public static final int DIR_E
- See Also:
- Constant Field Values
DIR_SE
public static final int DIR_SE
- See Also:
- Constant Field Values
DIR_SW
public static final int DIR_SW
- See Also:
- Constant Field Values
Move
public Move(int _x,
int _y,
int _dir)
convertDir
public static int convertDir(java.lang.String strdir)
convertDir
public static java.lang.String convertDir(int dir)
toString
public java.lang.String toString()
getX
public int getX()
getY
public int getY()
getDir
public int getDir()
deepclone
public Move deepclone()