From 675b8ba995f087a2015a71eb7a1fbe1f16be6e18 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Tue, 22 Jun 2021 10:54:42 -0400 Subject: [PATCH] FlappyBug: Standardize on "high score" rather than "highscore" "High score" should be two words, and this matches other games in the system. --- Userland/Games/FlappyBug/Game.cpp | 8 ++++---- Userland/Games/FlappyBug/Game.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Userland/Games/FlappyBug/Game.cpp b/Userland/Games/FlappyBug/Game.cpp index 64f8a210b0c..f236ada2d99 100644 --- a/Userland/Games/FlappyBug/Game.cpp +++ b/Userland/Games/FlappyBug/Game.cpp @@ -28,14 +28,14 @@ void Game::reset() void Game::game_over() { if (on_game_end) - m_highscore = on_game_end(static_cast(m_difficulty)); + m_high_score = on_game_end(static_cast(m_difficulty)); reset(); } bool Game::ready_to_start() const { - if (!m_highscore.has_value()) { + if (!m_high_score.has_value()) { return true; } @@ -70,8 +70,8 @@ void Game::paint_event(GUI::PaintEvent& event) if (m_active) { painter.draw_text({ 10, 10, 100, 100 }, String::formatted("{:.0}", m_difficulty), Gfx::TextAlignment::TopLeft, Color::White); - } else if (m_highscore.has_value()) { - auto message = String::formatted("Your score: {:.0}\nHighscore: {:.0}\n\n{}", m_last_score, m_highscore.value(), m_restart_cooldown < 0 ? "Press any key to play again" : " "); + } else if (m_high_score.has_value()) { + auto message = String::formatted("Your score: {:.0}\nHigh score: {:.0}\n\n{}", m_last_score, m_high_score.value(), m_restart_cooldown < 0 ? "Press any key to play again" : " "); painter.draw_text(rect(), message, Gfx::TextAlignment::Center, Color::White); } else { painter.draw_text(rect(), "Press any key to start", Gfx::TextAlignment::Center, Color::White); diff --git a/Userland/Games/FlappyBug/Game.h b/Userland/Games/FlappyBug/Game.h index 150e4dbb454..90061b01763 100644 --- a/Userland/Games/FlappyBug/Game.h +++ b/Userland/Games/FlappyBug/Game.h @@ -143,7 +143,7 @@ private: Obstacle m_obstacle; Cloud m_cloud; bool m_active; - Optional m_highscore {}; + Optional m_high_score {}; float m_last_score {}; float m_difficulty {}; float m_restart_cooldown {};