aboutsummaryrefslogtreecommitdiff
path: root/src/game/game.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/game.hpp')
-rw-r--r--src/game/game.hpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/game/game.hpp b/src/game/game.hpp
index 9ec5b41..2493a42 100644
--- a/src/game/game.hpp
+++ b/src/game/game.hpp
@@ -1,6 +1,5 @@
#pragma once
-#include "DI/auto_wirable.hpp"
#include "interfaces/cursor.hpp"
#include "interfaces/game.hpp"
#include "interfaces/scene.hpp"
@@ -8,16 +7,21 @@
#include <memory>
-class Game : public IGame, public AutoWirable<IGame, Game>
+class Game : public IGame
{
public:
- Game() noexcept = default;
+ Game(const std::shared_ptr<IWindow> &window, const std::shared_ptr<IScene> &scene,
+ const std::shared_ptr<ICursorController> &cursor_controller) noexcept;
- void run() noexcept override;
+ void on_start() noexcept override;
+
+ void on_exit() const noexcept override;
[[nodiscard]] 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 override;
+ get_input_config() const noexcept override;
+
+private:
+ const std::shared_ptr<IWindow> &_window;
+ const std::shared_ptr<IScene> &_scene;
+ const std::shared_ptr<ICursorController> &_cursor_controller;
};