All Known Implementing Classes:
GameIsActiveValidator, MovementSourceIsHomeValidator, MovementTargetEmptyValidator, MovementTargetIsOnBoardValidator, PlayerIsParticipatingValidator, PlayerIsPlayingRightTokenTypeValidator, PlayersTurnValidator, TicTacToeMovementValidatorChain

public interface MoveValidator
validates token moves
Author:
hendrik
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    validate​(GameBoard board, Player player, BoardToken token, int xIndex, int yIndex)
    validates a move
  • Method Details

    • validate

      boolean validate(GameBoard board, Player player, BoardToken token, int xIndex, int yIndex)
      validates a move
      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