diff options
author | HampusM <hampus@hampusmat.com> | 2022-03-23 19:41:31 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:57 +0200 |
commit | 486ca3846b46dc229e5807968578809766ec1991 (patch) | |
tree | 65a4b7a746d6305666af06f8a1975c76244085a7 /src/game/game.hpp | |
parent | b8e86ce397dc07320c02f6a5f592c7c6a4421c86 (diff) |
feat: implement generations & multithreading
Diffstat (limited to 'src/game/game.hpp')
-rw-r--r-- | src/game/game.hpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/game/game.hpp b/src/game/game.hpp index 2493a42..5894a01 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -2,7 +2,10 @@ #include "interfaces/cursor.hpp" #include "interfaces/game.hpp" +#include "interfaces/generation_tracker.hpp" #include "interfaces/scene.hpp" +#include "interfaces/status_updater.hpp" +#include "interfaces/statusline.hpp" #include "interfaces/window.hpp" #include <memory> @@ -10,18 +13,26 @@ class Game : public IGame { public: - Game(const std::shared_ptr<IWindow> &window, const std::shared_ptr<IScene> &scene, - const std::shared_ptr<ICursorController> &cursor_controller) noexcept; + Game(std::shared_ptr<IWindow> window, std::shared_ptr<IScene> scene, + std::shared_ptr<ICursorController> cursor_controller, + std::shared_ptr<IStatusLine> statusline, + std::shared_ptr<IGenerationTracker> generation_tracker, + std::shared_ptr<IStatusUpdater> status_updater) noexcept; void on_start() noexcept override; + void on_update() noexcept override; + void on_exit() const noexcept override; [[nodiscard]] std::unordered_map<char, std::shared_ptr<ICommand>> 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; + std::shared_ptr<IWindow> _window; + std::shared_ptr<IScene> _scene; + std::shared_ptr<ICursorController> _cursor_controller; + std::shared_ptr<IStatusLine> _statusline; + std::shared_ptr<IGenerationTracker> _generation_tracker; + std::shared_ptr<IStatusUpdater> _status_updater; }; |