aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/core/game.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libjin/core/game.h')
-rw-r--r--src/libjin/core/game.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/libjin/core/game.h b/src/libjin/core/game.h
new file mode 100644
index 0000000..d56b249
--- /dev/null
+++ b/src/libjin/core/game.h
@@ -0,0 +1,38 @@
+#ifndef __JIN_CORE_GAME_H
+#define __JIN_CORE_GAME_H
+
+namespace jin
+{
+namespace core
+{
+ class Game
+ {
+ public:
+
+ 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();
+
+ static Game* g_game;
+
+ bool run;
+ };
+}
+}
+
+#endif \ No newline at end of file