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

            return currentBoardState;
        }