diff --git a/Userland/Games/Pong/Game.h b/Userland/Games/Pong/Game.h index 9817600e7c..ab1350fc7b 100644 --- a/Userland/Games/Pong/Game.h +++ b/Userland/Games/Pong/Game.h @@ -75,16 +75,18 @@ private: } }; + constexpr static int score_margin = 5; + Gfx::IntRect player_1_score_rect() const { int score_width = font().width(String::formatted("{}", m_player_1_score)); - return { (game_width / 2) + score_width + 2, 2, score_width, font().glyph_height() }; + return { (game_width / 2) + score_margin, score_margin, score_width, font().glyph_height() }; } Gfx::IntRect player_2_score_rect() const { int score_width = font().width(String::formatted("{}", m_player_2_score)); - return { (game_width / 2) - score_width - 2, 2, score_width, font().glyph_height() }; + return { (game_width / 2) - score_width - score_margin, score_margin, score_width, font().glyph_height() }; } Net m_net;