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

            return currentBoardState;
        }