X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fposition.h;h=3fabf64c8156ddac239390d58fcb79bb10f81eb8;hb=5f142ec2098531bac1780f67579dedbd12d18dcc;hp=ceebce1c61c79e47683338ce7d913c6e8b1bb38c;hpb=7f4f18f959044ee964f8574e625484594c9974b1;p=stockfish diff --git a/src/position.h b/src/position.h index ceebce1c..3fabf64c 100644 --- a/src/position.h +++ b/src/position.h @@ -82,7 +82,7 @@ enum CastleRights { struct UndoInfo { int castleRights; Square epSquare; - Bitboard checkersBB; + Bitboard checkersBB, pinners[2], pinned[2], dcCandidates[2]; Key key, pawnKey, materialKey; int rule50; Move lastMove; @@ -197,6 +197,7 @@ public: // Bitboards for pinned pieces and discovered check candidates Bitboard discovered_check_candidates(Color c) const; + Bitboard pinned_pieces(Color c, Bitboard& p) const; Bitboard pinned_pieces(Color c) const; // Checking pieces @@ -312,7 +313,7 @@ private: void update_checkers(Bitboard* pCheckersBB, Square ksq, Square from, Square to, Bitboard dcCandidates); template - Bitboard hidden_checks(Color c, Square ksq) const; + Bitboard hidden_checks(Color c, Square ksq, Bitboard& pinners) const; // Computing hash keys from scratch (for initialization and debugging) Key compute_key() const; @@ -329,6 +330,7 @@ private: // Bitboards Bitboard byColorBB[2], byTypeBB[8]; Bitboard checkersBB; + mutable Bitboard pinners[2], pinned[2], dcCandidates[2]; // Board Piece board[64];