- Bitboard target;
-
- if (Type == CAPTURES)
- target = pos.pieces(~us);
-
- else if (Type == QUIETS)
- target = ~pos.pieces();
-
- else if (Type == NON_EVASIONS)
- target = ~pos.pieces(us);
-
- mlist = (us == WHITE ? generate_pawn_moves<WHITE, Type>(pos, mlist, target)
- : generate_pawn_moves<BLACK, Type>(pos, mlist, target));
-
- mlist = generate_moves<KNIGHT>(pos, mlist, us, target);
- mlist = generate_moves<BISHOP>(pos, mlist, us, target);
- mlist = generate_moves<ROOK>(pos, mlist, us, target);
- mlist = generate_moves<QUEEN>(pos, mlist, us, target);
- mlist = generate_moves<KING>(pos, mlist, us, target);