What I'd tackle next, in rough priority order.
The service already holds players: Player[] and currentIndex, so the additive work is:
- Add
addPlayer(name: string),removePlayer(id: string)toBowlingGameService - Add a player-tabs strip above the scoreboard (new component, no changes to existing ones)
- Turn rotation in the service: after each complete frame, advance
currentIndex; game ends when every player'sgame.isComplete()istrue BowlingGame.rollsalready exposes the flat roll sequence, so serialising each player's game state for persistence is a one-liner
BowlingGame exposes rolls: readonly number[]. A complete save state is:
{ players: [{ id, name, rolls }], currentIndex }Deserialise by replaying rolls into a fresh BowlingGame. Start with localStorage;
swap to IndexedDB or a backend later without changing the domain.
- Add
undo(): voidtoBowlingGame(pop the last roll from_rolls) - Show a roll-history row below the scoreboard with traditional marks (X, /, –, digit)
- Good candidate for a separate
RollHistoryComponent
The current pin-pad is functional. Polish ideas:
- Animate the pins visually (knocked-down vs standing) to give tactile feedback
- Show a pin diagram that greys out fallen pins on the second roll
- Keyboard shortcut: pressing 0–9 selects that pin count; Enter/Space rolls
- ARIA roles on the scoreboard (
role="grid",role="row",role="gridcell") - Announce roll results to screen readers via a live region (
aria-live="polite") - Ensure colour contrast meets WCAG AA for disabled buttons
- Focus management after reset (move focus to first enabled pin button)
Unit tests cover the domain well. Add Playwright E2E tests for:
- Full game via the UI (click through all rolls)
- Spare + bonus flow
- Frame 10 edge cases through the UI
- Invalid state cannot be reached via the UI (all invalid buttons disabled)
- Reset flow
The challenge spec is in German, so i18n is a realistic next step:
- Wire
@angular/localize - Extract the status message strings into translation units
- Add
deandenlocales as a starting point
- GitHub Actions workflow: install → build → test on every pull request
- Pre-commit hook:
ng lint+ng test --watch=false - Branch protection: require green CI before merge