aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-03-08 16:26:17 +0100
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:55 +0200
commit9dd5936333082305b0b9680db2eac9abd128129b (patch)
treec99bff09a066bde806a520058347b549ed287a9f /src/interfaces
parent3a24ec6e5b5236ad6b943548b9948603e053559d (diff)
refactor: add game factory
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/game.hpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/interfaces/game.hpp b/src/interfaces/game.hpp
index eb13dc3..85c20e5 100644
--- a/src/interfaces/game.hpp
+++ b/src/interfaces/game.hpp
@@ -3,6 +3,8 @@
#include "interfaces/input.hpp"
#include "interfaces/scene.hpp"
+#include <memory>
+
class IGame
{
public:
@@ -10,3 +12,5 @@ public:
virtual void run(IScene &scene, IInputHandler &input_handler) = 0;
};
+
+using IGameFactory = std::shared_ptr<IGame> (*)();