Package-level declarations
Persisted state and the pure reducers that update it: records, streaks, medals, unlocks, heatmaps and the LAN board.
Types
Bonus games unlocked by playing well.
Ludo rewards: winning the game pays most; every game and every duel won pays a little.
Everything needed to record one finished round.
Medals are handed out every Medals.GAP games of a streak. Win streaks climb five tiers (Diamond repeats past the top), losing streaks earn Grit badges, and snapping a losing streak of at least one gap earns a Comeback.
A game in progress, saved when the app goes to the background so it can be resumed later.
Persists at most one SavedSession — the last unfinished game — in app-private storage. Written atomically, like the stats file, so a kill mid-save can't corrupt it.
Pure state transitions for StatsData — kept separate from I/O so they are unit-testable.
Scoreboard, profiles and match history, stored as one JSON file in app-private storage. Writes go to a temp file first and are renamed into place so a crash can't corrupt it.