]> git.sesse.net Git - stockfish/blobdiff - src/endgame.cpp
Further simplify unstoppable (#938)
[stockfish] / src / endgame.cpp
index 618113904afe096c87ee3c56378b7fd0ac330628..38c322afc7dbb1a2214c711b1f7cd6a6f56fe569 100644 (file)
@@ -652,17 +652,15 @@ ScaleFactor Endgame<KBPKB>::operator()(const Position& pos) const {
 
       if (relative_rank(strongSide, pawnSq) <= RANK_5)
           return SCALE_FACTOR_DRAW;
-      else
-      {
-          Bitboard path = forward_bb(strongSide, pawnSq);
+      
+      Bitboard path = forward_bb(strongSide, pawnSq);
 
-          if (path & pos.pieces(weakSide, KING))
-              return SCALE_FACTOR_DRAW;
+      if (path & pos.pieces(weakSide, KING))
+          return SCALE_FACTOR_DRAW;
 
-          if (  (pos.attacks_from<BISHOP>(weakBishopSq) & path)
-              && distance(weakBishopSq, pawnSq) >= 3)
-              return SCALE_FACTOR_DRAW;
-      }
+      if (  (pos.attacks_from<BISHOP>(weakBishopSq) & path)
+          && distance(weakBishopSq, pawnSq) >= 3)
+          return SCALE_FACTOR_DRAW;
   }
   return SCALE_FACTOR_NONE;
 }