#pragma once #include "interfaces/cursor.hpp" #include "interfaces/game.hpp" #include "interfaces/generation_tracker.hpp" #include "interfaces/input.hpp" #include "interfaces/scene.hpp" #include "interfaces/status_manager.hpp" #include #include class Game : public IGame { public: Game( std::shared_ptr scene, std::shared_ptr cursor_controller, std::shared_ptr generation_tracker, std::shared_ptr status_manager, std::shared_ptr user_input_observer) noexcept; void on_start() noexcept override; void on_update() noexcept override; void on_exit() const noexcept override; private: std::shared_ptr _scene; std::shared_ptr _cursor_controller; std::shared_ptr _generation_tracker; std::shared_ptr _status_manager; std::shared_ptr _user_input_observer; using TimePoint = std::chrono::system_clock::time_point; TimePoint _last_update_time; TimePoint _last_gen_update_time; int _gen_update_speed_millis; void _move_cursor(const Vector2 &direction) noexcept; void _insert_cell(const Vector2 &position, char cell) noexcept; };