summaryrefslogtreecommitdiff
path: root/game/gamestate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/gamestate.cpp')
-rw-r--r--game/gamestate.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/game/gamestate.cpp b/game/gamestate.cpp
new file mode 100644
index 0000000..fcd4248
--- /dev/null
+++ b/game/gamestate.cpp
@@ -0,0 +1,15 @@
+#include "gamestate.h"
+#include <cassert>
+
+GameState * gameState {nullptr};
+
+GameState::GameState()
+{
+ assert(!gameState);
+ gameState = this;
+}
+
+GameState::~GameState()
+{
+ gameState = nullptr;
+}