- void clear();
- void put_piece(Piece p, Square s);
- void set_castle_right(Color c, Square rfrom);
-
- // Helper template functions
- template<bool Do> void do_castle_move(Move m);
- template<bool FindPinned> Bitboard hidden_checkers() const;
-
- // Computing hash keys from scratch (for initialization and debugging)
- Key compute_key() const;
- Key compute_pawn_key() const;
- Key compute_material_key() const;
-
- // Computing incremental evaluation scores and material counts
- Score compute_psq_score() const;
- Value compute_non_pawn_material(Color c) const;
-
- // Board and pieces
- Piece board[64]; // [square]
- Bitboard byTypeBB[8]; // [pieceType]
- Bitboard byColorBB[2]; // [color]
- int pieceCount[2][8]; // [color][pieceType]
- Square pieceList[2][8][16]; // [color][pieceType][index]
- int index[64]; // [square]
-
- // Other info
- int castleRightsMask[64]; // [square]
- Square castleRookSquare[2][2]; // [color][side]
- Bitboard castlePath[2][2]; // [color][side]
- StateInfo startState;
- int64_t nodes;
- int startPosPly;
+ void set_castling_right(Color c, Square rfrom);
+ void set_state(StateInfo* si) const;
+ void set_check_info(StateInfo* si) const;
+
+ // Other helpers
+ void put_piece(Piece pc, Square s);
+ void remove_piece(Piece pc, Square s);
+ void move_piece(Piece pc, Square from, Square to);
+ template<bool Do>
+ void do_castling(Color us, Square from, Square& to, Square& rfrom, Square& rto);
+
+ // Data members
+ Piece board[SQUARE_NB];
+ Bitboard byTypeBB[PIECE_TYPE_NB];
+ Bitboard byColorBB[COLOR_NB];
+ int pieceCount[PIECE_NB];
+ Square pieceList[PIECE_NB][16];
+ int index[SQUARE_NB];
+ int castlingRightsMask[SQUARE_NB];
+ Square castlingRookSquare[CASTLING_RIGHT_NB];
+ Bitboard castlingPath[CASTLING_RIGHT_NB];
+ uint64_t nodes;
+ int gamePly;