From cf42b50e5f5c0da9338311930c4fee977e6d5802 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 21 May 2026 12:49:48 +0000 Subject: [PATCH] feat(ux): implement explicit empty state for high score Add an encouraging placeholder text when the user has not yet set a high score (`highscore == 0`) instead of hiding the UI element completely, clarifying system state for new users. Also records this UX learning in `.Jules/palette.md`. 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..42f732d 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-05-24 - Explicit Empty States for Onboarding +**Learning:** In terminal applications, providing explicit, encouraging empty states for data or achievements (like a high score) rather than hiding the UI element when empty clarifies system state and improves user onboarding. +**Action:** Always display placeholder text or calls to action when data is absent to guide new users. diff --git a/src/main.cpp b/src/main.cpp index af692c8..26b12aa 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 << "None yet! Go set a record!" << CLR_RESET << "\n\n"; } std::cout << "Controls:\n " << CLR_CTRL << "[h]" << CLR_RESET << " Toggle Hard Mode (10x Speed!)\n "