#include "position.h"
#include "psqtab.h"
#include "rkiss.h"
-#include "san.h"
#include "tt.h"
#include "ucioption.h"
return true;
// Draw by the 50 moves rule?
- if (st->rule50 > 99 && (st->rule50 > 100 || !is_mate()))
+ if (st->rule50 > 99 && !is_mate())
return true;
// Draw by repetition?
bool Position::is_mate() const {
MoveStack moves[MOVES_MAX];
- return is_check() && generate_moves(*this, moves) == moves;
+ return is_check() && generate<MV_LEGAL>(*this, moves) == moves;
}
do_null_move(st1);
// Then generate pseudo-legal moves that could give check
- last = generate_non_capture_checks(*this, mlist);
- last = generate_captures(*this, last);
+ last = generate<MV_NON_CAPTURE_CHECK>(*this, mlist);
+ last = generate<MV_CAPTURE>(*this, last);
// Loop through the moves, and see if one of them gives mate
Bitboard pinned = pinned_pieces(sideToMove);