mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 17:49:35 +00:00
Change condition to use relative rank
No functional change
This commit is contained in:
parent
6ab8b9b6c6
commit
03cd049c68
1 changed files with 1 additions and 1 deletions
|
@ -818,7 +818,7 @@ Value do_evaluate(const Position& pos, Value& margin) {
|
||||||
ebonus -= Value(square_distance(pos.king_square(Us), blockSq) * 2 * rr);
|
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 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);
|
ebonus -= Value(square_distance(pos.king_square(Us), blockSq + pawn_push(Us)) * rr);
|
||||||
|
|
||||||
// If the pawn is free to advance, increase bonus
|
// If the pawn is free to advance, increase bonus
|
||||||
|
|
Loading…
Add table
Reference in a new issue