# New Game Wizard (`@lib/features/new-game`) Composable building blocks for the multi-step "start a new game" workflow. ## Exports - `Player1Step`, `Player2Step`, `Player3Step` – Player name capture with history + quick picks. - `GameTypeStep` – Game type selector. - `RaceToStep` – Numeric race-to chooser with infinity support. - `BreakRuleStep`, `BreakOrderStep` – Break configuration helpers. - `PlayerSelectModal` – Modal surface for long player lists. All exports are surfaced via `@lib/features/new-game`. ## Props & Contracts - Steps expect pure callbacks (`onNext`, `onCancel`) and derive their own UI state. - Player history arrays control quick-pick ordering. Empty arrays fall back gracefully. - Styling is shared via `NewGame.module.css` to keep a consistent visual language. ## Integrating the Wizard ```tsx import { Player1Step, Player2Step } from '@lib/features/new-game'; import { useNewGameWizard } from '@lib/state'; const wizard = useNewGameWizard(); return ( <> {wizard.newGameStep === 'player1' && ( { wizard.updateGameData({ player1: name }); wizard.nextStep('player2'); }} onCancel={wizard.resetWizard} /> )} {/* render subsequent steps analogously */} ); ```