X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.h;h=1bb2e3888e47edfe155cf863f68b7ec0efc0b126;hp=fd2222b4ec9360cf3c04e882d3324aa2ea23b444;hb=08abe8b4a33ab409f5b61ebcb9216ddf8a605e95;hpb=23943208ecddf25869d564509e66dd2f15710b9d diff --git a/src/position.h b/src/position.h index fd2222b4..1bb2e388 100644 --- a/src/position.h +++ b/src/position.h @@ -166,8 +166,7 @@ public: void do_move(Move m, StateInfo& st); void do_move(Move m, StateInfo& st, const CheckInfo& ci, bool moveIsCheck); void undo_move(Move m); - void do_null_move(StateInfo& st); - void undo_null_move(); + template void do_null_move(StateInfo& st); // Static exchange evaluation int see(Move m) const; @@ -214,14 +213,12 @@ private: // Initialization helper functions (used while setting up a position) void clear(); void put_piece(Piece p, Square s); - void set_castle(int f, Square ksq, Square rsq); - void set_castling_rights(char token); + void set_castle_right(Square ksq, Square rsq); bool move_is_legal(const Move m) const; // Helper functions for doing and undoing moves void do_capture_move(Key& key, PieceType capture, Color them, Square to, bool ep); - void do_castle_move(Move m); - void undo_castle_move(Move m); + template void do_castle_move(Move m); template Bitboard hidden_checkers() const; @@ -263,7 +260,7 @@ private: // Static variables static Score pieceSquareTable[16][64]; // [piece][square] - static Key zobrist[2][8][64]; // [color][pieceType][square] + static Key zobrist[2][8][64]; // [color][pieceType][square]/[piece count] static Key zobEp[64]; // [square] static Key zobCastle[16]; // [castleRight] static Key zobSideToMove;