## Summary Upstream: [pickleball-shuffler#25](https://github.com/panathea/pickleball-shuffler/issues/25) (part 3 of 3) Round generation for **separate** vs **combined** group play, including swing-player placement and edge-case handling. ## Separate groups (default) - Each group runs an **independent** jumble schedule. - UI shows both under the same **Round N** timeline (#34 layout). - Each group uses its own court count (from court assignments in #34). - Sit-out logic runs **per group**; UI remains seamless (one sit-out flow, backend per group). ## Combined rounds - **Merge all players** into one pool — skill labels ignored for that round. - Courts used = **sum** of all group court counts. - Host chooses combined mode **per round** (override session default from #33). - Group court labels hidden on combined rounds (#34). ## Swing players (multi-group membership) - Each separate round, swing players assigned to **one** group by the algorithm to preserve even mix. - Edge cases / oddities → assign to **higher-priority group** (drag order from #33). - Non-swing players stay in their sole group. ## Too-small group - If a group cannot generate (e.g. <4 players for its court count): **block with message**. - Offer host option to switch to **combined** round to continue. ## Mid-session enable - Enabling groups mid-session (#33): applies from **next round**; everyone defaults Standard until reassigned. ## Acceptance criteria - [ ] Separate mode: independent schedules per group, shared round numbers - [ ] Combined mode: merged pool, courts = sum of group courts - [ ] Per-round separate/combined override - [ ] Swing player assignment per separate round; higher-priority fallback - [ ] Too-small group blocks + offers combined fallback - [ ] Per-group sit-out logic (seamless UI) - [ ] Integrates with #30 diversity rules and #34 court layout - [ ] Automated tests for separate/combined/swing scenarios - [ ] `yarn test:ci` and `yarn build` pass ## Files likely touched - `src/matching/heuristics.ts` - `src/matching/worker.ts` - `src/useShuffler.tsx` - `src/SitoutsModal.tsx` - `pages/rounds.tsx` - `test/heuristics.spec.tsx` ## Dependencies - #33 (groups foundation) - #34 (court-to-group mapping + layout) - #30 (session mix algorithm + pre-gen) ## Upstream reference - https://github.com/panathea/pickleball-shuffler/issues/25
Summary
Upstream: pickleball-shuffler#25 (part 3 of 3)
Round generation for separate vs combined group play, including swing-player placement and edge-case handling.
Separate groups (default)
Combined rounds
Swing players (multi-group membership)
Too-small group
Mid-session enable
Acceptance criteria
yarn test:ciandyarn buildpassFiles likely touched
src/matching/heuristics.tssrc/matching/worker.tssrc/useShuffler.tsxsrc/SitoutsModal.tsxpages/rounds.tsxtest/heuristics.spec.tsxDependencies
Upstream reference