public void RestoreState(BoardState stateToRestore) { squareToPiece = stateToRestore.CurrentBoardPosition; PieceToBitboard = stateToRestore.PieceToBitboard; castlingAndEnPassant = stateToRestore.CastlingAndEnPassant; sideToMove = stateToRestore.SideToMove; ZobristHash = stateToRestore.ZobristHash; }
public Board(BoardState state) : this() { RestoreState(state); }
public BoardState GetBoardState() { BoardState currentBoardState = new BoardState((Piece[])squareToPiece.Clone(), (UInt64[])PieceToBitboard.Clone(), new CastlingAndEnPassantRights(castlingAndEnPassant), sideToMove, ZobristHash); return currentBoardState; }