Class Board

java.lang.Object
io.github.wolfraam.chessgame.board.Board
All Implemented Interfaces:
Serializable, Cloneable

public class Board extends Object implements Serializable, Cloneable
The chess board.
See Also:
  • Method Details

    • fromFen

      public static Board fromFen(String fen)
    • fromInitialPosition

      public static Board fromInitialPosition()
    • canCastle

      public boolean canCastle(CastleMoveType castleMoveType)
    • clone

      public Board clone()
      Overrides:
      clone in class Object
    • getASCII

      public String getASCII()
    • getFen

      public String getFen()
    • getFenSmall

      public String getFenSmall()
    • getFullMoveCount

      public int getFullMoveCount()
    • getInitialFen

      public String getInitialFen()
    • getOccupiedSquares

      public Set<Square> getOccupiedSquares()
    • getPiece

      public Piece getPiece(Square square)
    • getSideToMove

      public Side getSideToMove()
    • getSquares

      public Set<Square> getSquares(Piece piece)
    • isDrawFiftyMoveRule

      public boolean isDrawFiftyMoveRule()
    • isDrawInsufficientMaterial

      public boolean isDrawInsufficientMaterial()
    • isDrawThreefoldRepetition

      public boolean isDrawThreefoldRepetition()
    • isEnPassant

      public boolean isEnPassant(Square from, Square to)
    • playMove

      public Piece playMove(Square from, Square to, PieceType promotion, boolean updateHistory)
    • playMoveAndRollBack

      public <T> T playMoveAndRollBack(Square from, Square to, PieceType promotion, Supplier<T> supplier)
    • squareIsEmpty

      public boolean squareIsEmpty(Square square)