mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 10:57:43 +00:00
Retire is_mate()
No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
+1
-10
@@ -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<MV_LEGAL>(*this).size()))
|
||||
return true;
|
||||
|
||||
// Draw by repetition?
|
||||
@@ -1531,15 +1531,6 @@ template bool Position::is_draw<false>() const;
|
||||
template bool Position::is_draw<true>() 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<MV_LEGAL>(*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
|
||||
|
||||
Reference in New Issue
Block a user