Class MovementTargetIsOnBoardValidator
java.lang.Object
games.stendhal.server.entity.mapstuff.game.movevalidator.MovementTargetIsOnBoardValidator
- All Implemented Interfaces:
MoveValidator
Is the movement target on board?
- Author:
- hendrik
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvalidate(GameBoard board, Player player, BoardToken token, int xIndex, int yIndex)validates a move
-
Constructor Details
-
MovementTargetIsOnBoardValidator
public MovementTargetIsOnBoardValidator()
-
-
Method Details
-
validate
Description copied from interface:MoveValidatorvalidates a move- Specified by:
validatein 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
-