- mlist = (us == WHITE ? generate_pawn_moves<WHITE, MV_QUIET_CHECK>(pos, mlist, ci.dcCandidates, ci.ksq)
- : generate_pawn_moves<BLACK, MV_QUIET_CHECK>(pos, mlist, ci.dcCandidates, ci.ksq));
-
- mlist = generate_direct_checks<KNIGHT>(pos, mlist, us, ci);
- mlist = generate_direct_checks<BISHOP>(pos, mlist, us, ci);
- mlist = generate_direct_checks<ROOK>(pos, mlist, us, ci);
- mlist = generate_direct_checks<QUEEN>(pos, mlist, us, ci);
-
- if (pos.can_castle(us))
- {
- mlist = generate_castle<KING_SIDE, true>(pos, mlist, us);
- mlist = generate_castle<QUEEN_SIDE, true>(pos, mlist, us);
- }
-
- return mlist;
+ return us == WHITE ? generate_all<WHITE, QUIET_CHECKS>(pos, moveList, ~pos.pieces(), &ci)
+ : generate_all<BLACK, QUIET_CHECKS>(pos, moveList, ~pos.pieces(), &ci);