Enum Class Piece

java.lang.Object
java.lang.Enum<Piece>
io.github.wolfraam.chessgame.board.Piece
All Implemented Interfaces:
Serializable, Comparable<Piece>, Constable

public enum Piece extends Enum<Piece>
Chess Piece.
  • Enum Constant Details

    • WHITE_PAWN

      public static final Piece WHITE_PAWN
    • WHITE_KNIGHT

      public static final Piece WHITE_KNIGHT
    • WHITE_BISHOP

      public static final Piece WHITE_BISHOP
    • WHITE_ROOK

      public static final Piece WHITE_ROOK
    • WHITE_QUEEN

      public static final Piece WHITE_QUEEN
    • WHITE_KING

      public static final Piece WHITE_KING
    • BLACK_PAWN

      public static final Piece BLACK_PAWN
    • BLACK_KNIGHT

      public static final Piece BLACK_KNIGHT
    • BLACK_BISHOP

      public static final Piece BLACK_BISHOP
    • BLACK_ROOK

      public static final Piece BLACK_ROOK
    • BLACK_QUEEN

      public static final Piece BLACK_QUEEN
    • BLACK_KING

      public static final Piece BLACK_KING
  • Field Details

    • fenCharacter

      public final char fenCharacter
    • pieceType

      public final PieceType pieceType
    • side

      public final Side side
  • Method Details

    • values

      public static Piece[] 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 Piece 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
    • fromFenNotation

      public static Piece fromFenNotation(char fenNotation)
    • fromPieceTypeAndSide

      public static Piece fromPieceTypeAndSide(PieceType pieceType, Side side)