X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=48e305efebf569bf1f672168a0f5da293fe748cf;hp=d6239594d9165cb91578311a353e801851ac724e;hb=883367d21749eb91a5a3737338b5a7f507751a5a;hpb=9dc6d270fc207d6715578b57a1cdf655527ec5fe 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.