Enum Class CastleMoveType

java.lang.Object
java.lang.Enum<CastleMoveType>
io.github.wolfraam.chessgame.move.castle.CastleMoveType
All Implemented Interfaces:
Serializable, Comparable<CastleMoveType>, Constable

public enum CastleMoveType extends Enum<CastleMoveType>
The four different castle move types.
  • Enum Constant Details

    • BLACK_KING_SIDE

      public static final CastleMoveType BLACK_KING_SIDE
    • BLACK_QUEEN_SIDE

      public static final CastleMoveType BLACK_QUEEN_SIDE
    • WHITE_KING_SIDE

      public static final CastleMoveType WHITE_KING_SIDE
    • WHITE_QUEEN_SIDE

      public static final CastleMoveType WHITE_QUEEN_SIDE
  • Field Details

    • castleType

      public final CastleType castleType
    • requiringEmptySquares

      public final Set<Square> requiringEmptySquares
    • rookFrom

      public final Square rookFrom
    • rookPiece

      public final Piece rookPiece
    • rookTo

      public final Square rookTo
    • side

      public final Side side
  • Method Details

    • values

      public static CastleMoveType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CastleMoveType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • determine

      public static CastleMoveType determine(Square from, Square to, Piece piece)