|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectaigames.soccer.Move
This class represents single move (i.e. sequence of steps) in soccer game.
| Field Summary | |
static java.lang.Integer |
E
Step east. |
static java.lang.Integer |
N
Step north. |
static java.lang.Integer |
NE
Step north-east. |
static java.lang.Integer |
NW
Step north-west. |
static java.lang.Integer |
S
Step south. |
static java.lang.Integer |
SE
Step south-east. |
static java.lang.Integer |
SW
Step south-west. |
static java.lang.Integer |
W
Step west. |
| Constructor Summary | |
Move(int[] steps)
Creates move with steps passed as parameter. |
|
Move(java.lang.Integer[] steps)
Creates move with steps passed as parameter. |
|
| Method Summary | |
void |
addStep(int step)
Adds single step to move instance. |
void |
addStep(java.lang.Integer step)
Adds single step to move instance. |
void |
addStepSequence(int[] steps)
Adds sequnece of steps to move instance. |
void |
addStepSequence(java.lang.Integer[] steps)
Adds sequnece of steps to move instance. |
java.util.Collection |
getSteps()
Returns Collection of steps in this move instance. |
static int[] |
getTranslation(java.lang.Integer direction)
Returns geometric translation corresponding to given direction. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.Integer N
public static final java.lang.Integer NE
public static final java.lang.Integer E
public static final java.lang.Integer SE
public static final java.lang.Integer S
public static final java.lang.Integer SW
public static final java.lang.Integer W
public static final java.lang.Integer NW
| Constructor Detail |
public Move(int[] steps)
throws InvalidMoveException
steps - Array of steps that move consists of.
InvalidMoveException - Thrown when steps are invalid.
public Move(java.lang.Integer[] steps)
throws InvalidMoveException
steps - Array of steps that move consists of.
InvalidMoveException - Thrown when steps are invalid.| Method Detail |
public static int[] getTranslation(java.lang.Integer direction)
direction - Step direction.
public void addStepSequence(java.lang.Integer[] steps)
throws InvalidMoveException
steps - Array of steps to add.
InvalidMoveException - Thrown when steps are invalid.
public void addStep(java.lang.Integer step)
throws InvalidMoveException
step - Step to add.
InvalidMoveException - Thrown when step is invalid.
public void addStep(int step)
throws InvalidMoveException
step - Step to add.
InvalidMoveException - Thrown when step is invalid.
public void addStepSequence(int[] steps)
throws InvalidMoveException
steps - Array of steps to add.
InvalidMoveException - Thrown when steps are invalid.public java.util.Collection getSteps()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||