X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;h=e69528ad0c628a2aca423d0d2575386dc75390db;hp=ef5fd97091cc4f0f478b41954090ba8e72a1799f;hb=e82382703c96cfc480555e9db29d999e1f54a38f;hpb=3b49aeb4f22569c2b5d5ca830858c4dd584fae7f diff --git a/src/position.cpp b/src/position.cpp index ef5fd970..e69528ad 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -617,7 +617,7 @@ bool Position::is_pseudo_legal(const Move m) const { // Evasions generator already takes care to avoid some kind of illegal moves // and pl_move_is_legal() relies on this. So we have to take care that the // same kind of moves are filtered out here. - if (in_check()) + if (checkers()) { if (type_of(pc) != KING) { @@ -1144,7 +1144,7 @@ void Position::do_castle_move(Move m) { template void Position::do_null_move(StateInfo& backupSt) { - assert(!in_check()); + assert(!checkers()); // Back up the information necessary to undo the null move to the supplied // StateInfo object. Note that differently from normal case here backupSt @@ -1428,7 +1428,7 @@ bool Position::is_draw() const { && (non_pawn_material(WHITE) + non_pawn_material(BLACK) <= BishopValueMg)) return true; - if (st->rule50 > 99 && (!in_check() || MoveList(*this).size())) + if (st->rule50 > 99 && (!checkers() || MoveList(*this).size())) return true; if (CheckRepetition)