mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +08:00
Change condition to use relative rank
No functional change
This commit is contained in:
committed by
Marco Costalba
parent
6ab8b9b6c6
commit
03cd049c68
@@ -818,7 +818,7 @@ Value do_evaluate(const Position& pos, Value& margin) {
|
||||
ebonus -= Value(square_distance(pos.king_square(Us), blockSq) * 2 * rr);
|
||||
|
||||
// If blockSq is not the queening square then consider also a second push
|
||||
if (rank_of(blockSq) != (Us == WHITE ? RANK_8 : RANK_1))
|
||||
if (relative_rank(Us, blockSq) != RANK_8)
|
||||
ebonus -= Value(square_distance(pos.king_square(Us), blockSq + pawn_push(Us)) * rr);
|
||||
|
||||
// If the pawn is free to advance, increase bonus
|
||||
|
||||
Reference in New Issue
Block a user