X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.h;h=36d65fb87b5ef11771294b6acc34fef1208a7f5f;hp=ded55d7b80d99b6ee56267b3ce7237b6ed0aa74a;hb=aab5863dd42da0a8e493a2ffaca96319b3d19ebb;hpb=1e032ece92da0085000cfdde28cab05029dedce3 diff --git a/src/position.h b/src/position.h index ded55d7b..36d65fb8 100644 --- a/src/position.h +++ b/src/position.h @@ -164,23 +164,22 @@ public: bool is_draw() const; // Position consistency check, for debugging - bool pos_is_ok(int* failedStep = NULL) const; + bool pos_is_ok(int* step = NULL) const; void flip(); private: // Initialization helpers (used while setting up a position) void clear(); void set_castling_right(Color c, Square rfrom); - void compute_keys(StateInfo* si) const; - void compute_non_pawn_material(StateInfo* si) const; - Score compute_psq_score() const; + void set_state(StateInfo* si) const; // Helper functions - void do_castling(Square kfrom, Square kto, Square rfrom, Square rto); Bitboard check_blockers(Color c, Color kingColor) const; void put_piece(Square s, Color c, PieceType pt); void remove_piece(Square s, Color c, PieceType pt); void move_piece(Square from, Square to, Color c, PieceType pt); + template + void do_castling(Square from, Square& to, Square& rfrom, Square& rto); // Board and pieces Piece board[SQUARE_NB];