Class MovementTargetEmptyValidator
java.lang.Object
games.stendhal.server.entity.mapstuff.game.movevalidator.MovementTargetEmptyValidator
- All Implemented Interfaces:
MoveValidator
Is the movement target empty?
- Author:
- hendrik
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
validate(GameBoard board, Player player, BoardToken token, int xIndex, int yIndex)
validates a move
-
Constructor Details
-
MovementTargetEmptyValidator
public MovementTargetEmptyValidator()
-
-
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
-