Fix passed pawn evaluation
authorFabian Fichter <ianfab@users.noreply.github.com>
Fri, 17 May 2019 13:21:47 +0000 (15:21 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Fri, 17 May 2019 13:21:47 +0000 (15:21 +0200)
No functional change for variants with promotion rank equal to 8.

src/evaluate.cpp

index 37b86eb..8e63e10 100644 (file)
@@ -751,7 +751,7 @@ namespace {
                                         - king_proximity(Us,   blockSq) * 2) * w);
 
                 // If blockSq is not the queening square then consider also a second push
-                if (r != pos.promotion_rank() - 1)
+                if (r != RANK_7)
                     bonus -= make_score(0, king_proximity(Us, blockSq + Up) * w);
             }