From 486ca3846b46dc229e5807968578809766ec1991 Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 23 Mar 2022 19:41:31 +0100 Subject: feat: implement generations & multithreading --- src/game/game.hpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'src/game/game.hpp') 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 @@ -10,18 +13,26 @@ class Game : public IGame { public: - Game(const std::shared_ptr &window, const std::shared_ptr &scene, - const std::shared_ptr &cursor_controller) noexcept; + Game(std::shared_ptr window, std::shared_ptr scene, + std::shared_ptr cursor_controller, + std::shared_ptr statusline, + std::shared_ptr generation_tracker, + std::shared_ptr status_updater) noexcept; void on_start() noexcept override; + void on_update() noexcept override; + void on_exit() const noexcept override; [[nodiscard]] std::unordered_map> get_input_config() const noexcept override; private: - const std::shared_ptr &_window; - const std::shared_ptr &_scene; - const std::shared_ptr &_cursor_controller; + std::shared_ptr _window; + std::shared_ptr _scene; + std::shared_ptr _cursor_controller; + std::shared_ptr _statusline; + std::shared_ptr _generation_tracker; + std::shared_ptr _status_updater; }; -- cgit v1.2.3-18-g5258