Class MoveOneRight

java.lang.Object
com.chess.backend.gamemodel.abstractmoves.MoveOneRight

public class MoveOneRight extends Object
Represents the implementation of a one-step move to the right.
  • Constructor Details

    • MoveOneRight

      public MoveOneRight()
  • Method Details

    • concretise

      public static Set<Move> concretise(Chessboard chessboard, Piece piece, boolean attack, boolean jump, boolean peaceful)
      Generate concrete possible moves from a given piece and game context. Direction: Right, one-step
      Parameters:
      chessboard - The chessboard.
      piece - The originating square.
      attack - Whether the piece may move to an occupied square. This would result in an attack with a captured piece.
      jump - Whether the piece may jump over other pieces (e.g. the knight).
      peaceful - Whether the piece may move to an empty field.
      Returns:
      HashSet of concrete moves