X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fendgame.cpp;h=b9ac17a2e9cf6486c4ca8ae22600bf46845d8753;hb=5aeb907fa19afb22c92b3076d3ff73386cf7755c;hp=c8d222804008c5d78019439bf5a53da610642d5f;hpb=d9be00342cb1719b1ec510a4284f198607ce25df;p=stockfish diff --git a/src/endgame.cpp b/src/endgame.cpp index c8d22280..b9ac17a2 100644 --- a/src/endgame.cpp +++ b/src/endgame.cpp @@ -407,19 +407,8 @@ ScaleFactor Endgame::operator()(const Position& pos) const { Square kingSq = pos.king_square(weakSide); if ( opposite_colors(queeningSq, bishopSq) - && abs(file_of(kingSq) - pawnFile) <= 1) - { - // The bishop has the wrong color, and the defending king is on the - // file of the pawn(s) or the adjacent file. Find the rank of the - // frontmost pawn. - Square pawnSq = frontmost_sq(strongSide, pawns); - - // If the defending king has distance 1 to the promotion square or - // is placed somewhere in front of the pawn, it's a draw. - if ( square_distance(kingSq, queeningSq) <= 1 - || relative_rank(weakSide, kingSq) <= relative_rank(weakSide, pawnSq)) - return SCALE_FACTOR_DRAW; - } + && square_distance(queeningSq, kingSq) <= 1) + return SCALE_FACTOR_DRAW; } // All pawns on same B or G file? Then potential draw