Class MovementTargetEmptyValidator

java.lang.Object
games.stendhal.server.entity.mapstuff.game.movevalidator.MovementTargetEmptyValidator
All Implemented Interfaces:
MoveValidator

public class MovementTargetEmptyValidator extends Object implements MoveValidator
Is the movement target empty?
Author:
hendrik
  • Constructor Details

    • MovementTargetEmptyValidator

      public MovementTargetEmptyValidator()
  • Method Details

    • validate

      public boolean validate(GameBoard board, Player player, BoardToken token, int xIndex, int yIndex)
      Description copied from interface: MoveValidator
      validates a move
      Specified by:
      validate in interface MoveValidator
      Parameters:
      board - the game board
      player - player doing the move
      token - the token which was moved
      xIndex - target x-index
      yIndex - target y-index
      Returns:
      true, if the move is valid, false otherwise