X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=ec443bef92d090b9b92176a4b15fccdd0ababd7d;hb=cf5d683408a2ef8a1c80be9bf7d6790a38b16277;hp=07680f1d1830e4447c7f61da25be41407bc69510;hpb=b9f1c9bf3f5ba240423a4f1ca8a2fb0f975a775e;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 07680f1d..ec443bef 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -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