diff options
author | HampusM <hampus@hampusmat.com> | 2022-03-20 14:09:48 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:56 +0200 |
commit | a9852bd2c5a601f9f9c58b1dff60e9130587657b (patch) | |
tree | 87830594a20614aa7f73f8dc15b86900e805dd4a /src/interfaces | |
parent | 78f5d8cf644383adf20933ad64c160c07c2c54fb (diff) |
refactor: move on start & on exit details to the game class
Diffstat (limited to 'src/interfaces')
-rw-r--r-- | src/interfaces/game.hpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/interfaces/game.hpp b/src/interfaces/game.hpp index cfff8c5..c99c01f 100644 --- a/src/interfaces/game.hpp +++ b/src/interfaces/game.hpp @@ -13,12 +13,14 @@ class IGame public: virtual ~IGame() = default; - virtual void run() = 0; + virtual void on_start() = 0; + + virtual void on_exit() const noexcept = 0; [[nodiscard]] virtual std::unordered_map<char, std::shared_ptr<ICommand>> - get_input_config( - const std::shared_ptr<IWindow> &window, const std::shared_ptr<IScene> &scene, - const std::shared_ptr<ICursorController> &cursor_controller) const noexcept = 0; + get_input_config() const noexcept = 0; }; -using IGameFactory = std::shared_ptr<IGame> (*)(); +using IGameFactory = std::shared_ptr<IGame> (*)( + const std::shared_ptr<IWindow> &window, const std::shared_ptr<IScene> &scene, + const std::shared_ptr<ICursorController> &cursor_controller); |