X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;h=88eb22eaa338d910b08647abbf4e95b0f3841de3;hp=085b9a3b1312771512a0b8615678d27283e4c983;hb=c19ea4b0005c312aceb82d31ea17c2e1ff0729d2;hpb=bede30e7a658dbb5e013351c86f77c3fd4bc8537 diff --git a/src/position.cpp b/src/position.cpp index 085b9a3b..88eb22ea 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -1499,7 +1499,7 @@ bool Position::is_draw() const { return true; // Draw by the 50 moves rule? - if (st->rule50 > 99 && !is_mate()) + if (st->rule50 > 99 && (!in_check() || MoveList(*this).size())) return true; // Draw by repetition? @@ -1531,15 +1531,6 @@ template bool Position::is_draw() const; template bool Position::is_draw() const; -/// Position::is_mate() returns true or false depending on whether the -/// side to move is checkmated. - -bool Position::is_mate() const { - - return in_check() && !MoveList(*this).size(); -} - - /// Position::init() is a static member function which initializes at startup /// the various arrays used to compute hash keys and the piece square tables. /// The latter is a two-step operation: First, the white halves of the tables