X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=48e305efebf569bf1f672168a0f5da293fe748cf;hp=f1bb861dcca629e08de695df7bb0c8ff4ccf0b2f;hb=e917bd59b1e317c6b48dc676473359fdfb86d9d4;hpb=79e3710fd224e6e052f6bc5420a8f8f03bf41e18 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index f1bb861d..48e305ef 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -309,7 +309,7 @@ namespace { attackedBy[Us][Pt] |= b; attackedBy[Us][ALL_PIECES] |= b; - if (b & kingRing[Them]) + if (b & kingRing[Them] & ~double_pawn_attacks_bb(pos.pieces(Them, PAWN))) { kingAttackersCount[Us]++; kingAttackersWeight[Us] += KingAttackWeights[Pt]; @@ -381,7 +381,7 @@ namespace { { File kf = file_of(pos.square(Us)); if ((kf < FILE_E) == (file_of(s) < kf)) - score -= (TrappedRook - make_score(mob * 22, 0)) * (1 + !pos.can_castle(Us)); + score -= (TrappedRook - make_score(mob * 22, 0)) * (1 + !pos.castling_rights(Us)); } } @@ -512,7 +512,7 @@ namespace { Score score = SCORE_ZERO; // Non-pawn enemies - nonPawnEnemies = pos.pieces(Them) ^ pos.pieces(Them, PAWN); + nonPawnEnemies = pos.pieces(Them) & ~pos.pieces(Them, PAWN); // Squares strongly protected by the enemy, either because they defend the // square with a pawn, or because they defend the square twice and we don't.