index d3665ea16a11a4bebb546e59eac7fd9ec964d821..fe02ca29efc07cf59327428819154bf0ae0728a0 100644 (file)
@@ -583,12 +583,12 @@ namespace {
Square blockSq = s + pawn_push(Us);

// Adjust bonus based on the king's proximity
Square blockSq = s + pawn_push(Us);

// Adjust bonus based on the king's proximity
-            ebonus +=  square_distance(pos.king_square(Them), blockSq) * 5 * rr
-                     - square_distance(pos.king_square(Us  ), blockSq) * 2 * rr;
+            ebonus +=  distance(pos.king_square(Them), blockSq) * 5 * rr
+                     - distance(pos.king_square(Us  ), blockSq) * 2 * rr;

// If blockSq is not the queening square then consider also a second push
if (relative_rank(Us, blockSq) != RANK_8)

// If blockSq is not the queening square then consider also a second push
if (relative_rank(Us, blockSq) != RANK_8)
-                ebonus -= square_distance(pos.king_square(Us), blockSq + pawn_push(Us)) * rr;
+                ebonus -= distance(pos.king_square(Us), blockSq + pawn_push(Us)) * rr;

// If the pawn is free to advance, then increase the bonus
if (pos.empty(blockSq))

// If the pawn is free to advance, then increase the bonus
if (pos.empty(blockSq))