mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:17:44 +00:00
FlappyBug: Keep track of score and highscore
Better information is now shown to the player. Instructions are shown when first loading the program, and any available scores are shown on the game over screen.
This commit is contained in:
parent
3f603ab082
commit
018344bb07
2 changed files with 23 additions and 5 deletions
|
@ -33,6 +33,7 @@ private:
|
|||
|
||||
void tick();
|
||||
void reset();
|
||||
void game_over();
|
||||
|
||||
struct Bug {
|
||||
const float x { 50 };
|
||||
|
@ -95,6 +96,8 @@ private:
|
|||
Bug m_bug;
|
||||
Obstacle m_obstacle;
|
||||
bool m_active;
|
||||
Optional<float> m_highscore;
|
||||
float m_last_score;
|
||||
float m_difficulty;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue