From: homoSapiensSapiens Date: Mon, 9 Sep 2013 19:12:15 +0000 (+0300) Subject: Change condition to use relative rank X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=03cd049c6858f5d1c4b7e50f08d7ddc45e0a029e Change condition to use relative rank No functional change --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 340a342f..c7fec913 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -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