X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.h;h=ac63c11c36e612a09aa59b4e779b39bc1c74fb2e;hp=bd59b5c959d624c90c66a63f943a04f33d19fd0b;hb=68e711aac603388d38490521cf336b535aa10c91;hpb=c02613860a3836bb85da25ae2fed9f1351ba27a5 diff --git a/src/position.h b/src/position.h index bd59b5c9..ac63c11c 100644 --- a/src/position.h +++ b/src/position.h @@ -79,14 +79,15 @@ enum CastleRights { /// must be passed as a parameter. struct StateInfo { - Bitboard checkersBB; Key key, pawnKey, materialKey; int castleRights, rule50; Square epSquare; Value mgValue, egValue; + PieceType capture; - StateInfo* previous; + Bitboard checkersBB; Move lastMove; + StateInfo* previous; }; @@ -311,8 +312,8 @@ private: template void update_checkers(Bitboard* pCheckersBB, Square ksq, Square from, Square to, Bitboard dcCandidates); - template - Bitboard hidden_checks(Color c, Square ksq, Bitboard& pinners) const; + template + Bitboard hidden_checkers(Color c) const; // Computing hash keys from scratch (for initialization and debugging) Key compute_key() const; @@ -565,6 +566,14 @@ inline Bitboard Position::checkers() const { return st->checkersBB; } +inline Bitboard Position::pinned_pieces(Color c) const { + return hidden_checkers(c); +} + +inline Bitboard Position::discovered_check_candidates(Color c) const { + return hidden_checkers(c); +} + inline bool Position::is_check() const { return st->checkersBB != EmptyBoardBB; }