X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.h;h=4c041716db854c72d8e3a0d36e54a5e75563b163;hp=0426ec3683d68de129f9fcea19357720fcb6d522;hb=d703d2b5e760edf4d34b6664f2d0552ffe424b12;hpb=7133598a98301cf84857d39194026b876da48b96 diff --git a/src/pawns.h b/src/pawns.h index 0426ec36..4c041716 100644 --- a/src/pawns.h +++ b/src/pawns.h @@ -37,16 +37,7 @@ struct Entry { Bitboard pawn_attacks(Color c) const { return pawnAttacks[c]; } Bitboard passed_pawns(Color c) const { return passedPawns[c]; } Bitboard pawn_attacks_span(Color c) const { return pawnAttacksSpan[c]; } - int weak_unopposed(Color c) const { return weakUnopposed[c]; } - int passed_count() const { return passedCount; } - - int semiopen_file(Color c, File f) const { - return semiopenFiles[c] & (1 << f); - } - - int pawns_on_same_color_squares(Color c, Square s) const { - return pawnsOnSquares[c][bool(DarkSquares & s)]; - } + int passed_count() const { return popcount(passedPawns[WHITE] | passedPawns[BLACK]); } template Score king_safety(const Position& pos) { @@ -58,7 +49,7 @@ struct Entry { Score do_king_safety(const Position& pos); template - Value evaluate_shelter(const Position& pos, Square ksq); + Score evaluate_shelter(const Position& pos, Square ksq); Key key; Score scores[COLOR_NB]; @@ -67,16 +58,11 @@ struct Entry { Bitboard pawnAttacksSpan[COLOR_NB]; Square kingSquares[COLOR_NB]; Score kingSafety[COLOR_NB]; - int weakUnopposed[COLOR_NB]; int castlingRights[COLOR_NB]; - int semiopenFiles[COLOR_NB]; - int pawnsOnSquares[COLOR_NB][COLOR_NB]; // [color][light/dark squares] - int passedCount; }; -typedef HashTable Table; +typedef HashTable Table; -void init(); Entry* probe(const Position& pos); } // namespace Pawns