|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcheckers.model.Rules
checkers.model.ForceJumpValidator
public class ForceJumpValidator
This class is used to check for force jumps. In the case where force jumps exist the move provided is checked to make sure that it is a force jump.
Field Summary |
---|
Fields inherited from interface checkers.CheckersConstants |
---|
ACCEPT, BLUE, CLIENTGAME, DRAW, HOST, HOSTGAME, JOIN, KING, LOCAL, LOCALGAME, NUM_SPACES, PLAYER1SET, PLAYER2SET, RESIGN, SINGLE, UPDATE, WHITE |
Constructor Summary | |
---|---|
ForceJumpValidator()
Constructor |
Method Summary | |
---|---|
boolean |
pieceHasForceJumps(int pos)
pieceHasForceJumps Check whether a piece has any force jumps. |
boolean |
validateMove(Move move)
validateMove Validates that the move is a force jump if force jumps exist. |
Methods inherited from class checkers.model.Rules |
---|
getInstance, getJumpIndex, isJump, setBoard |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ForceJumpValidator()
Method Detail |
---|
public boolean validateMove(Move move)
validateMove
in class Rules
move
- the move to be validated
public boolean pieceHasForceJumps(int pos)
pos
- the position on the board that needs to be checked
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |