diff options
Diffstat (limited to 'src/core/game.h')
-rw-r--r-- | src/core/game.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/core/game.h b/src/core/game.h index 939d945..d56b249 100644 --- a/src/core/game.h +++ b/src/core/game.h @@ -9,12 +9,21 @@ namespace core { public: - void quit(); - - bool running(); - - static Game* get(); - + static inline Game* get() + { + return g_game ? g_game : (g_game = new Game()); + } + + inline void quit() + { + run = false; + } + + inline bool running() + { + return run; + } + private: Game(); |