We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ab8b9b commit 03cd049Copy full SHA for 03cd049
src/evaluate.cpp
@@ -818,7 +818,7 @@ Value do_evaluate(const Position& pos, Value& margin) {
818
ebonus -= Value(square_distance(pos.king_square(Us), blockSq) * 2 * rr);
819
820
// If blockSq is not the queening square then consider also a second push
821
- if (rank_of(blockSq) != (Us == WHITE ? RANK_8 : RANK_1))
+ if (relative_rank(Us, blockSq) != RANK_8)
822
ebonus -= Value(square_distance(pos.king_square(Us), blockSq + pawn_push(Us)) * rr);
823
824
// If the pawn is free to advance, increase bonus
0 commit comments