Class TicTacToeMovementValidatorChain
java.lang.Object
games.stendhal.server.entity.mapstuff.game.TicTacToeMovementValidatorChain
- All Implemented Interfaces:
MoveValidator
a validator chain for the Tick Tack Toe game.
- Author:
- hendrik
-
Constructor Summary
ConstructorDescriptioncreates a new TickTackToeMovementValidatorChain. -
Method Summary
Modifier and TypeMethodDescriptionboolean
validate(GameBoard board, Player player, BoardToken token, int xIndex, int yIndex)
validates a move
-
Constructor Details
-
TicTacToeMovementValidatorChain
public TicTacToeMovementValidatorChain()creates a new TickTackToeMovementValidatorChain.
-
-
Method Details
-
validate
Description copied from interface:MoveValidator
validates a move- Specified by:
validate
in interfaceMoveValidator
- 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
-