1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:17:35 +00:00

FlappyBug: Propagate errors in Bug class

Move-construct Bug into the Game class to improve
error handling.
This commit is contained in:
creator1creeper1 2021-12-23 22:21:33 +01:00 committed by Brian Gianforcaro
parent a67afa735c
commit ff359c27e3
3 changed files with 21 additions and 5 deletions

View file

@ -8,7 +8,8 @@
namespace FlappyBug {
Game::Game()
Game::Game(Bug bug)
: m_bug(move(bug))
{
set_override_cursor(Gfx::StandardCursor::Hidden);
start_timer(16);