From d27f1a89266e141a944f88e9080bdeca95c49da3 Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 3 Mar 2022 20:40:29 +0100 Subject: refactor: add game initializer --- src/interfaces/game.hpp | 5 ++++- src/interfaces/game_initializer.hpp | 9 +++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 src/interfaces/game_initializer.hpp (limited to 'src/interfaces') diff --git a/src/interfaces/game.hpp b/src/interfaces/game.hpp index 114f019..eb13dc3 100644 --- a/src/interfaces/game.hpp +++ b/src/interfaces/game.hpp @@ -1,9 +1,12 @@ #pragma once +#include "interfaces/input.hpp" +#include "interfaces/scene.hpp" + class IGame { public: virtual ~IGame() = default; - virtual void run() = 0; + virtual void run(IScene &scene, IInputHandler &input_handler) = 0; }; diff --git a/src/interfaces/game_initializer.hpp b/src/interfaces/game_initializer.hpp new file mode 100644 index 0000000..5dea2e9 --- /dev/null +++ b/src/interfaces/game_initializer.hpp @@ -0,0 +1,9 @@ +#pragma once + +#include "interfaces/game.hpp" + +class IGameInitializer +{ +public: + virtual void initialize() = 0; +}; -- cgit v1.2.3-18-g5258