X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fpawns.cpp;h=36b10f32f6e1606a91f69bda1964bda11a51b4cb;hb=542a2b39ed811a3795cdce2416896ffaf2a485cf;hp=75b94c19c0d012e1a00e7e3abc98d644afb4072b;hpb=738a6dfd4c71c3ce11d614076117793b4cdf119e;p=stockfish diff --git a/src/pawns.cpp b/src/pawns.cpp index 75b94c19..36b10f32 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -250,10 +250,10 @@ Score Entry::do_king_safety(const Position& pos, Square ksq) { Value bonus = evaluate_shelter(pos, ksq); // If we can castle use the bonus after the castling if it is bigger - if (pos.can_castle(MakeCastling::right)) + if (pos.can_castle(Us | KING_SIDE)) bonus = std::max(bonus, evaluate_shelter(pos, relative_square(Us, SQ_G1))); - if (pos.can_castle(MakeCastling::right)) + if (pos.can_castle(Us | QUEEN_SIDE)) bonus = std::max(bonus, evaluate_shelter(pos, relative_square(Us, SQ_C1))); return make_score(bonus, -16 * minKingPawnDistance);