]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Stockfish 10-beta
[stockfish] / src / search.cpp
index 07680f1d1830e4447c7f61da25be41407bc69510..ec443bef92d090b9b92176a4b15fccdd0ababd7d 100644 (file)
@@ -2,7 +2,7 @@
   Stockfish, a UCI chess playing engine derived from Glaurung 2.1
   Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
   Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad
-  Copyright (C) 2015-2018 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad
+  Copyright (C) 2015-2019 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad
 
   Stockfish is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -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