diff --git a/src/main.cpp b/src/main.cpp index e72f1da..7fdfb50 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -94,7 +94,7 @@ int main() { } for (int i = 3; i > 0; --i) { - std::cout << "\rStarting in " << i << "... " << std::flush; + std::cout << "\rStarting in " << CLR_CTRL << i << CLR_RESET << "... " << std::flush; auto start_wait = std::chrono::steady_clock::now(); while (std::chrono::duration_cast(std::chrono::steady_clock::now() - start_wait).count() < 1000) { int elapsed = std::chrono::duration_cast(std::chrono::steady_clock::now() - start_wait).count(); @@ -108,7 +108,7 @@ int main() { } } } - std::cout << "\rGO! \n" << std::flush; + std::cout << "\r" << CLR_NORM << "GO! " << CLR_RESET << "\n" << std::flush; std::this_thread::sleep_for(std::chrono::milliseconds(200)); tcflush(STDIN_FILENO, TCIFLUSH); @@ -137,9 +137,10 @@ int main() { } if (updateUI) { - std::cout << "\r" << CLR_SCORE << "Score: " << score << CLR_RESET << " " + std::cout << "\r" << CLR_SCORE << "Score: " << score << CLR_RESET + << " | High: " << CLR_SCORE << std::max(score, highscore) << CLR_RESET << " " << (hardMode ? CLR_HARD "[HARD MODE]" : CLR_NORM "[NORMAL MODE]") - << (score > initialHighscore && initialHighscore > 0 ? " NEW BEST! 🥳" : "") + << (score > initialHighscore ? " NEW BEST! 🥳" : "") << " " << std::flush; updateUI = false; } @@ -151,7 +152,7 @@ int main() { tcsetattr(STDIN_FILENO, TCSANOW, &oldt); std::cout << "\n\n" << CLR_SCORE << "Final Score: " << score << CLR_RESET << "\n"; - if (score > initialHighscore && initialHighscore > 0) { + if (score > initialHighscore) { std::cout << "Congratulations! A new personal best!\n"; } std::cout << "Thanks for playing!\n";