if (m == MOVE_NULL)
return "(null)";
- assert(pos.move_is_legal(m));
+ assert(MoveList<LEGAL>(pos).contains(m));
Bitboard attackers;
bool ambiguousMove, ambiguousFile, ambiguousRank;
{
Square sq = pop_lsb(&attackers);
- // Pinned pieces are not included in the possible sub-set
+ // If the move is illegal, the piece is not included in the sub-set
if (!pos.pl_move_is_legal(make_move(sq, to), pos.pinned_pieces()))
continue;