bglga/TODO/GAL-53.md
Harald Hoyer 365e3a7cc4 chore(todo): add acceptance criteria and test hints to open issues
Flesh out the 14 still-open issues (GAL-34/35/36/37, 40/41, 43, 46/47/48/49,
52/53/55) with explicit acceptance criteria and concrete integration test
hints that reference existing types and headless tooling, so future work
on these tickets has a clear definition of done.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 09:53:09 +02:00

1.1 KiB

id title status parent labels
GAL-53 Implement a High Score system (saving/loading) Todo GAL-50
polish
ui

GAL-53: Implement a High Score system (saving/loading)

Implement a High Score system (saving/loading).

Acceptance criteria

  • High score persists to disk under a platform-appropriate path (e.g. dirs::data_dir()/bglga/highscore.json).
  • Loaded on startup into a HighScore resource; defaults to 0 if the file is absent or corrupt (no panic).
  • Updated only when Score > HighScore on entering GameOver, then persisted.
  • Visible on Start Menu (best so far) and Game Over (best vs current).
  • Save path overridable via env var or test-only setter so tests don't pollute the user's real config.

Integration test hints

  • Use a tmp dir override; pre-write {"high_score": 5000}; build App; assert HighScore resource = 5000.
  • Pre-write malformed JSON; assert loader falls back to 0 and doesn't panic.
  • Run scenario: set Score = 7000; transition to GameOver; reload from disk; assert persisted value = 7000.
  • Concurrency / crash safety: write via temp file + rename, not in-place truncate.