X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.h;h=5d14f0642195febc82309eff7234f5a3c2811425;hp=eec8ff7494df11a72c5d376b693d98193165c57c;hb=f2e78d9f841b53b8d512ad2687ff982cf841df58;hpb=782c3f36ccd4aeb52fd7eb92590d5e5e48741eaa diff --git a/src/position.h b/src/position.h index eec8ff74..5d14f064 100644 --- a/src/position.h +++ b/src/position.h @@ -263,7 +263,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; @@ -371,6 +371,14 @@ inline Bitboard Position::attacks_from(Square s) const { return attacks_from(s) | attacks_from(s); } +inline Bitboard Position::attacks_from(Piece p, Square s) const { + return attacks_from(p, s, occupied_squares()); +} + +inline Bitboard Position::attackers_to(Square s) const { + return attackers_to(s, occupied_squares()); +} + inline Bitboard Position::checkers() const { return st->checkersBB; }