Skip to content

Commit 03cd049

Browse files
R-Pelegmcostalba
authored andcommitted
Change condition to use relative rank
No functional change
1 parent 6ab8b9b commit 03cd049

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/evaluate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ Value do_evaluate(const Position& pos, Value& margin) {
818818
ebonus -= Value(square_distance(pos.king_square(Us), blockSq) * 2 * rr);
819819

820820
// If blockSq is not the queening square then consider also a second push
821-
if (rank_of(blockSq) != (Us == WHITE ? RANK_8 : RANK_1))
821+
if (relative_rank(Us, blockSq) != RANK_8)
822822
ebonus -= Value(square_distance(pos.king_square(Us), blockSq + pawn_push(Us)) * rr);
823823

824824
// If the pawn is free to advance, increase bonus

0 commit comments

Comments
 (0)