Pseudo-legal moves should be filtered out before do_move is called
calcitem opened this issue · 1 comments
calcitem commented
const Move move = mp.moves[i].move;
// Make and search the move
pos->do_move(move);
const Color after = pos->sideToMove;
/// Position::do_move() makes a move, and saves all information necessary
/// to a StateInfo object. The move is assumed to be legal. Pseudo-legal
/// moves should be filtered out before this function is called.
void Position::do_move(Move m)
// TODO: Need? move generator has filtered them.
if (!rule.mayRemoveFromMillsAlways && potential_mills_count(s, NOBODY)
#ifndef MADWEASEL_MUEHLE_RULE
&& !is_all_in_mills(~sideToMove)
#endif
) {
return false;
}
But the non-adjacent pieces are not filtered, and the pieces in the mill are not filtered, but the legality is checked in remove_piece().
calcitem commented
consider human vs human