aboutsummaryrefslogtreecommitdiff
path: root/src/engine/engine.cpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-05-22 17:05:00 +0200
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:59 +0200
commit7de921836587cdc359c2c4b84ed6446ada16c008 (patch)
treec4ec20b4769817c41ce7d939956da297bf787597 /src/engine/engine.cpp
parent723ea6535b4c4e5605e5592137a898d6ffa458c1 (diff)
refactor: remove window class
Diffstat (limited to 'src/engine/engine.cpp')
-rw-r--r--src/engine/engine.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp
index 8b55d88..fda1fc2 100644
--- a/src/engine/engine.cpp
+++ b/src/engine/engine.cpp
@@ -9,24 +9,22 @@ CLIGameEngine::CLIGameEngine(
IGameFactory game_factory,
ISceneFactory scene_factory,
std::shared_ptr<IInputHandler> input_handler,
- std::shared_ptr<ICursorController> cursor_controller,
- std::shared_ptr<IWindow> window) noexcept
+ std::shared_ptr<ICursorController> cursor_controller) noexcept
: _game_factory(std::move(game_factory)),
_scene_factory(std::move(scene_factory)),
_input_handler(std::move(input_handler)),
- _cursor_controller(std::move(cursor_controller)),
- _window(std::move(window))
+ _cursor_controller(std::move(cursor_controller))
{
}
void CLIGameEngine::start() noexcept
{
- std::shared_ptr<IScene> scene = _scene_factory(_cursor_controller, _window);
+ std::shared_ptr<IScene> scene = _scene_factory(_cursor_controller);
scene->enter();
_input_handler->enter_raw_mode();
- auto game = _game_factory(_window, scene, _cursor_controller);
+ auto game = _game_factory(scene, _cursor_controller);
game->on_start();