- Square sq = pop_lsb(&attackers);
-
- // Pinned pieces are not included in the possible sub-set
- if (!pos.pl_move_is_legal(make_move(sq, to), pos.pinned_pieces()))
- continue;
-
- ambiguousFile |= file_of(sq) == file_of(from);
- ambiguousRank |= rank_of(sq) == rank_of(from);
- ambiguousMove = true;
+ Move move = make_move(pop_lsb(&b), to);
+ if (!pos.legal(move, pos.pinned_pieces(pos.side_to_move())))
+ others ^= from_sq(move);