Simplify Castle Extension
[stockfish] / src / search.cpp
index 07680f1d1830e4447c7f61da25be41407bc69510..e113068c408561c402f47513e685bb1b874b25a4 100644 (file)
@@ -944,10 +944,8 @@ moves_loop: // When in check, search starts from here
                &&  pos.see_ge(move))
           extension = ONE_PLY;
 
-      // Extension for king moves that change castling rights
-      if (   pos.can_castle(us)
-          && type_of(movedPiece) == KING
-          && depth < 12 * ONE_PLY)
+      else if (   pos.can_castle(us) // Extension for king moves that change castling rights
+               && type_of(movedPiece) == KING)
           extension = ONE_PLY;
 
       // Calculate new depth for this move