X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fevaluate.cpp;h=3c0be19d2aa0c75d9974b6a86dfe61491d94c0df;hb=95212222c7444538b84326208e433ac12f15e9fb;hp=657b0f49257d7eb4a6c8e7fd24f6434ae0596f74;hpb=deb212cb052b50caa68542cde8e14ef6c6a0a01c;p=stockfish diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 657b0f49..3c0be19d 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -570,11 +570,11 @@ namespace { if (s == relative_square(Us, SQ_A1) || s == relative_square(Us, SQ_H1)) { Square d = pawn_push(Us) + (square_file(s) == FILE_A ? DELTA_E : DELTA_W); - if (pos.piece_on(s + d) == piece_of_color_and_type(Us, PAWN)) + if (pos.piece_on(s + d) == make_piece(Us, PAWN)) { if (!pos.square_is_empty(s + d + pawn_push(Us))) bonus -= 2*TrappedBishopA1H1Penalty; - else if (pos.piece_on(s + 2*d) == piece_of_color_and_type(Us, PAWN)) + else if (pos.piece_on(s + 2*d) == make_piece(Us, PAWN)) bonus -= TrappedBishopA1H1Penalty; else bonus -= TrappedBishopA1H1Penalty / 2;