- 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;
+ Square s = pop_lsb(&b);
+ if (!pos.legal(make_move(s, to), pos.pinned_pieces(us)))
+ others ^= s;