From 05e18465afb4e614480c7ac70c2a91540a60d0cb Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 24 May 2026 12:30:35 +0000 Subject: [PATCH] Add explicit empty state for highscore When the highscore is 0, explicitly show an empty state ("0 (None yet, go get 'em!)") instead of hiding the high score completely, to improve the onboarding experience. Co-authored-by: EiJackGH <172181576+EiJackGH@users.noreply.github.com> --- .Jules/palette.md | 4 ++++ src/main.cpp | 2 ++ 2 files changed, 6 insertions(+) diff --git a/.Jules/palette.md b/.Jules/palette.md index 853ef9c..d9a5e50 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -29,3 +29,7 @@ ## 2025-01-24 - Real-time Achievement Feedback in CLI **Learning:** In terminal-based games, displaying achievement progress (like a live high score) in real-time provides immediate tactile reward and engagement. Furthermore, inclusive UX means ensuring first-time players also receive "New Best" feedback, even when their initial record is zero. **Action:** Update session-high-score variables immediately upon record-breaking and display them in the live HUD. Ensure achievement conditions (`score > highscore`) don't exclude the first-time user experience. + +## 2026-10-24 - Empty States as Onboarding +**Learning:** In CLI applications, explicitly displaying empty states (e.g., a score of 0 with an encouraging message) provides better onboarding than hiding the UI element entirely. It clarifies the system state and motivates the user. +**Action:** Always provide explicit, encouraging empty states for data or achievements rather than hiding the UI element when empty. diff --git a/src/main.cpp b/src/main.cpp index af692c8..c0c22bb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -78,6 +78,8 @@ int main() { if (highscore > 0) { std::cout << " Personal Best: " << CLR_SCORE << highscore << CLR_RESET << "\n\n"; + } else { + std::cout << " Personal Best: " << CLR_SCORE << "0 (None yet, go get 'em!)" << CLR_RESET << "\n\n"; } std::cout << "Controls:\n " << CLR_CTRL << "[h]" << CLR_RESET << " Toggle Hard Mode (10x Speed!)\n "