From 0c23dfde84553da223a9383a77ecc4783b02ede9 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 7 May 2026 23:33:34 +0200 Subject: [PATCH] chore(todo): update GAL-53 status to Done and mark acceptance criteria complete --- TODO/GAL-50.md | 2 +- TODO/GAL-53.md | 16 ++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/TODO/GAL-50.md b/TODO/GAL-50.md index f021ee8..5692921 100644 --- a/TODO/GAL-50.md +++ b/TODO/GAL-50.md @@ -14,6 +14,6 @@ Score, lives, stage, high-score, start menu, and restart UI. - [x] [GAL-51](GAL-51.md) — Display Score, Lives, and Stage in the window title. - [ ] [GAL-52](GAL-52.md) — Display Score, Lives, and Stage on the screen using `bevy_ui`. -- [ ] [GAL-53](GAL-53.md) — Implement a High Score system (saving/loading). +- [x] [GAL-53](GAL-53.md) — Implement a High Score system (saving/loading). - [x] [GAL-54](GAL-54.md) — Create a Start Menu state with a "Start Game" button. - [ ] [GAL-55](GAL-55.md) — Add a "Press R to Restart" message to the `GameOver` screen and implement restart logic. diff --git a/TODO/GAL-53.md b/TODO/GAL-53.md index 2919823..31d70e5 100644 --- a/TODO/GAL-53.md +++ b/TODO/GAL-53.md @@ -1,7 +1,7 @@ --- id: GAL-53 title: Implement a High Score system (saving/loading) -status: Todo +status: Done parent: GAL-50 labels: [polish, ui] --- @@ -12,11 +12,11 @@ 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. +- [x] High score persists to disk under a platform-appropriate path (e.g. `dirs::data_dir()/bglga/highscore.json`). +- [x] Loaded on startup into a `HighScore` resource; defaults to 0 if the file is absent or corrupt (no panic). +- [x] Updated only when `Score > HighScore` on entering `GameOver`, then persisted. +- [x] Visible on Start Menu (best so far) and Game Over (best vs current). +- [x] Save path overridable via env var or test-only setter so tests don't pollute the user's real config. ## Integration test hints @@ -24,3 +24,7 @@ Implement a High Score system (saving/loading). - 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. + +## Comments + +- 2026-05-07 — Branch `opencode/clever-wolf`, commit ff3416b — High score system implemented with persistence, UI display, and integration tests.