public class Move
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
protected Board | 
board  | 
protected Board[] | 
boards  | 
protected Dice | 
dice  | 
protected Movement[] | 
movements  | 
protected int | 
player  | 
protected int[] | 
used  | 
static int | 
USED  | 
| Constructor and Description | 
|---|
Move(Dice dice,
    Board board,
    int player)
Builds a new Move, using the provided dice roll 
 | 
Move(Move move)
Clones the given move 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addMovement(Movement movement)
Adds a movement to this move. 
 | 
boolean | 
equals(java.lang.Object other)
Returns whether or not this move is equal to the other 
 | 
Board | 
getCurrentBoard()
Returns the current scratch board, or the board with all internmediate
 movements applied 
 | 
protected int | 
getNumMovements()
Returns the number of movements currently in this move 
 | 
Board | 
getOriginalBoard()
Returns the starting board of the move 
 | 
int | 
hashCode()
Returns the hashCode of this move 
 | 
boolean | 
isFull()
Returns whether or not there are move moves to be made 
 | 
boolean | 
movePossible()
Returns whether or not a move is possible for the
 current user. 
 | 
java.lang.String | 
toString()
Returns a String representation of this move 
 | 
public static int USED
protected Dice dice
protected Movement[] movements
protected int[] used
protected Board board
protected Board[] boards
protected int player
public Move(Dice dice, Board board, int player)
dice - The dice rollpublic Move(Move move)
move - The move to clonepublic boolean movePossible()
player - The current playerpublic void addMovement(Movement movement) throws IllegalMoveException
movement - The movement ot addIllegalMoveExceptionpublic Board getCurrentBoard()
public Board getOriginalBoard()
public boolean isFull()
protected int getNumMovements()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - TO come topublic java.lang.String toString()
toString in class java.lang.Object