From 095aba0b832b699e69778fade002dc8f55812a7e Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2026 13:30:16 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Add=20CLI=20UX=20enha?= =?UTF-8?q?ncements=20to=20NumberGuess?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added ANSI color constants for visually distinct feedback. - Used ASCII-art borders for headers. - Included trend emojis (šŸ“‰, šŸ“ˆ) and pointer (šŸ‘‰) for better interactivity and aesthetics. - Replaced Windows-specific `system("pause")` with cross-platform standard input waits (`cin.ignore()`, `cin.get()`). Co-authored-by: EiJackGH <172181576+EiJackGH@users.noreply.github.com> --- NumberGuess/NumberGuess.cpp | 39 ++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/NumberGuess/NumberGuess.cpp b/NumberGuess/NumberGuess.cpp index c82e2f8..0e933f3 100644 --- a/NumberGuess/NumberGuess.cpp +++ b/NumberGuess/NumberGuess.cpp @@ -5,11 +5,19 @@ using namespace std; +// ANSI Color Codes +const string RESET = "\033[0m"; +const string RED = "\033[31m"; +const string GREEN = "\033[32m"; +const string YELLOW = "\033[33m"; +const string CYAN = "\033[36m"; + void showEasterEgg() { - cout << "\n[!] EASTER EGG ACTIVATED: THE ZEN MODE" << endl; - cout << "Inspired by the Word 1.1a secret found 29 years later." << endl; - cout << "EiJackGH Lab - Saying YES in 2026." << endl; - cout << "========================================" << endl; + cout << CYAN << "\n╔════════════════════════════════════════╗" << RESET << endl; + cout << CYAN << "ā•‘ " << YELLOW << "✨ EASTER EGG ACTIVATED: THE ZEN MODE ✨" << CYAN << " ā•‘" << RESET << endl; + cout << CYAN << "ā•‘ " << RESET << "Inspired by the Word 1.1a secret. " << CYAN << "ā•‘" << RESET << endl; + cout << CYAN << "ā•‘ " << RESET << "EiJackGH Lab - Saying YES in 2026. " << CYAN << "ā•‘" << RESET << endl; + cout << CYAN << "ā•šā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•" << RESET << endl; } int main() { @@ -21,12 +29,14 @@ int main() { int guess = 0; int attempts = 0; - cout << "--- EI-JACK LAB: NUMBER GUESSER V1.0 ---" << endl; - cout << "I'm thinking of a number between 1 and 100." << endl; + cout << CYAN << "╔════════════════════════════════════════╗" << RESET << endl; + cout << CYAN << "ā•‘ šŸŽ² EI-JACK LAB: NUMBER GUESSER V1.0 ā•‘" << RESET << endl; + cout << CYAN << "ā•šā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•" << RESET << endl; + cout << "\nI'm thinking of a number between 1 and 100." << endl; cout << "(Hint: Type 'zen' to see the credits)" << endl << endl; while (guess != secretNumber) { - cout << "Enter your guess: "; + cout << "šŸ‘‰ Enter your guess: "; cin >> input; // Check for Easter Egg @@ -39,23 +49,24 @@ int main() { try { guess = stoi(input); } catch (...) { - cout << "Invalid input. Please enter a number." << endl; + cout << RED << "Invalid input. Please enter a number." << RESET << endl; continue; } attempts++; if (guess > secretNumber) { - cout << ">>> Too high! Try again." << endl; + cout << RED << "šŸ“ˆ Too high! Try again." << RESET << endl; } else if (guess < secretNumber) { - cout << ">>> Too low! Try again." << endl; + cout << YELLOW << "šŸ“‰ Too low! Try again." << RESET << endl; } else { - cout << "\nCONGRATULATIONS!" << endl; - cout << "You found it in " << attempts << " attempts." << endl; + cout << GREEN << "\nšŸŽ‰ CONGRATULATIONS! šŸŽ‰" << RESET << endl; + cout << GREEN << "You found it in " << attempts << " attempts." << RESET << endl; } } - cout << "----------------------------------------" << endl; - system("pause"); // Essential for Dev-C++ to keep the window open + cout << CYAN << "ā•šā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•ā•" << RESET << endl; + cout << "\nPress Enter to exit..." << endl; + cin.ignore(); cin.get(); // Cross-platform pause to keep the window open return 0; }