X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=48e305efebf569bf1f672168a0f5da293fe748cf;hp=d6239594d9165cb91578311a353e801851ac724e;hb=e917bd59b1e317c6b48dc676473359fdfb86d9d4;hpb=e8ffca3eb49f607d361688c41c9ae9b3b3de4b80 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index d6239594..48e305ef 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -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.