Interface MoveValidator
- All Known Implementing Classes:
GameIsActiveValidator
,MovementSourceIsHomeValidator
,MovementTargetEmptyValidator
,MovementTargetIsOnBoardValidator
,PlayerIsParticipatingValidator
,PlayerIsPlayingRightTokenTypeValidator
,PlayersTurnValidator
,TicTacToeMovementValidatorChain
public interface MoveValidator
validates token moves
- Author:
- hendrik
-
Method Summary
Modifier and TypeMethodDescriptionboolean
validate(GameBoard board, Player player, BoardToken token, int xIndex, int yIndex)
validates a move
-
Method Details
-
validate
validates a move- Parameters:
board
- the game boardplayer
- player doing the movetoken
- the token which was movedxIndex
- target x-indexyIndex
- target y-index- Returns:
- true, if the move is valid, false otherwise
-