- Color us = pos.side_to_move();
- Bitboard pinned = pos.blockers_for_king(us) & pos.pieces(us);
- Square ksq = pos.square<KING>(us);
- ExtMove* cur = moveList;
-
- moveList = pos.checkers() ? generate<EVASIONS >(pos, moveList)
- : generate<NON_EVASIONS>(pos, moveList);
- while (cur != moveList)
- if ( ((pinned && pinned & from_sq(*cur)) || from_sq(*cur) == ksq || type_of(*cur) == EN_PASSANT)
- && !pos.legal(*cur))
- *cur = (--moveList)->move;
- else
- ++cur;
-
- return moveList;
+ Color us = pos.side_to_move();
+ Bitboard pinned = pos.blockers_for_king(us) & pos.pieces(us);
+ Square ksq = pos.square<KING>(us);
+ ExtMove* cur = moveList;
+
+ moveList =
+ pos.checkers() ? generate<EVASIONS>(pos, moveList) : generate<NON_EVASIONS>(pos, moveList);
+ while (cur != moveList)
+ if (((pinned & from_sq(*cur)) || from_sq(*cur) == ksq || type_of(*cur) == EN_PASSANT)
+ && !pos.legal(*cur))
+ *cur = (--moveList)->move;
+ else
+ ++cur;
+
+ return moveList;