X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fposition.cpp;h=cb63cf9537775848cdc222856a87dfdddc445ef3;hb=a28f4a56d31c9e7f7c5ce28a93e2b2b9ca9be5e5;hp=8cc5fccd0bcc5e8cf51c405637a020929f5f20d3;hpb=23fd3796947a3a8863d4a336c7a30aba65752742;p=stockfish diff --git a/src/position.cpp b/src/position.cpp index 8cc5fccd..cb63cf95 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -1677,7 +1677,6 @@ Value Position::compute_non_pawn_material(Color c) const { /// Position::is_draw() tests whether the position is drawn by material, /// repetition, or the 50 moves rule. It does not detect stalemates, this /// must be done by the search. -// FIXME: Currently we are not handling 50 move rule correctly when in check bool Position::is_draw() const { @@ -1687,7 +1686,7 @@ bool Position::is_draw() const { return true; // Draw by the 50 moves rule? - if (st->rule50 > 100 || (st->rule50 == 100 && !is_check())) + if (st->rule50 > 99 && (st->rule50 > 100 || !is_mate())) return true; // Draw by repetition?