|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Mover
This class generates all legal moves. There are two fields, moves and jumps. moves is a LinkedList of elements of type aMove. jumps is a LinkedList of elements of type LinkedLists of Integers (the representation for jump). If there is at least one jump, then the jump must be taken. Therefore, if there is at least one jump, then move = null. If there are no legal jumps, then jump = null.
Field Summary | |
java.util.LinkedList |
jumps
|
java.util.LinkedList |
moves
|
Method Summary | |
void |
GetMoves(CheckerBoard b,
char player)
Given a CheckerBoard and a player (indicated by either 'p'. |
void |
GetMoves(CheckerBoard b,
int pos)
Given a CheckerBoard and a position on the board, sets moves to be all legal moves and jumps to be all legal jumps. |
java.util.LinkedList |
Jumps()
Returns jumps |
java.util.LinkedList |
Moves()
Returns moves. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public java.util.LinkedList moves
public java.util.LinkedList jumps
Method Detail |
public java.util.LinkedList Moves()
public java.util.LinkedList Jumps()
public void GetMoves(CheckerBoard b, char player)
public void GetMoves(CheckerBoard b, int pos)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |