Description
The GameOrchestrator and GameSession currently have no concept of a game mode. Both Race Mode and Practice Mode require branching behavior across phases, scoring, HUD, and persistence. This epic introduces a `GameMode` enum (`RACE`, `PRACTICE`), threads it through `GameSession`, `GameOrchestrator`, `GamePhaseFactory`, and `GameResultPersistenceService`, and adds a `gameMode` column to `game_results` via DB migration. No user-visible behavior changes — purely structural scaffolding.
Blocks all other game mode epics.
Acceptance Criteria
Technical Details
- `GameMode` belongs in `shared/common` (or `shared/api`) — zero platform imports
- Follow the Enum DSL pattern (cached `VALUES`, `byName()`/`byId()` lookup, `@Nullable` return)
- `GameSession` uses the Interface+Impl pattern; add `gameMode()` to the interface
- DB migration must be Hibernate-compatible (add column, not recreate table)
- `GamePhaseFactory` should use a sealed interface hierarchy per ManisGame pattern
Dependencies
None — this is the prerequisite epic for all other game mode work.
Estimate
L
Description
The GameOrchestrator and GameSession currently have no concept of a game mode. Both Race Mode and Practice Mode require branching behavior across phases, scoring, HUD, and persistence. This epic introduces a `GameMode` enum (`RACE`, `PRACTICE`), threads it through `GameSession`, `GameOrchestrator`, `GamePhaseFactory`, and `GameResultPersistenceService`, and adds a `gameMode` column to `game_results` via DB migration. No user-visible behavior changes — purely structural scaffolding.
Blocks all other game mode epics.
Acceptance Criteria
Technical Details
Dependencies
None — this is the prerequisite epic for all other game mode work.
Estimate
L