1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-05-02 09:39:36 +00:00

Change condition to use relative rank

No functional change
This commit is contained in:
homoSapiensSapiens 2013-09-09 22:12:15 +03:00 committed by Marco Costalba
parent 6ab8b9b6c6
commit 03cd049c68

View file

@ -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