]> git.sesse.net Git - stockfish/blobdiff - src/pawns.cpp
Drop the lever condition for backwards
[stockfish] / src / pawns.cpp
index ca9c302322be35fcc8383cd9f3b925691888fdf9..8b997b6056b99e8a55208fb980bd8312849cbca6 100644 (file)
@@ -118,8 +118,8 @@ namespace {
 
         // A pawn is backward when it is behind all pawns of the same color
         // on the adjacent files and cannot be safely advanced.
-        backward = !lever && !(ourPawns & pawn_attack_span(Them, s + Up))
-                          &&  (stoppers & (leverPush | (s + Up)));
+        backward =  !(ourPawns & pawn_attack_span(Them, s + Up))
+                  && (stoppers & (leverPush | (s + Up)));
 
         // Passed pawns will be properly scored in evaluation because we need
         // full attack info to evaluate them. Include also not passed pawns
@@ -223,7 +223,7 @@ Value Entry::evaluate_shelter(const Position& pos, Square ksq) {
 
   Value safety = (ourPawns & file_bb(ksq)) ? Value(5) : Value(-5);
 
-  if ((shift<Down>(theirPawns) & (FileABB | FileHBB) & BlockRanks) & ksq)
+  if (shift<Down>(theirPawns) & (FileABB | FileHBB) & BlockRanks & ksq)
       safety += 374;
 
   File center = std::max(FILE_B, std::min(FILE_G, file_of(ksq)));