diff --git a/.Jules/palette.md b/.Jules/palette.md index 853ef9c..66a7994 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -29,3 +29,6 @@ ## 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-25 - Empty States in CLI Applications +**Learning:** In terminal applications, displaying a blank space or skipping output when data (like a high score) is missing can leave users confused about the system state. Providing an explicit, encouraging empty state (e.g., "None yet! Go set a record!") clarifies that the system is working and gently onboards the user. +**Action:** Always provide explicit empty states for data-driven UI elements in CLI applications, rather than simply hiding them when empty. diff --git a/src/main.cpp b/src/main.cpp index af692c8..bb29f43 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_NORM << "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 "