diff options
Diffstat (limited to 'src/bootstrap.cpp')
-rw-r--r-- | src/bootstrap.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/bootstrap.cpp b/src/bootstrap.cpp index b11f199..2e687ed 100644 --- a/src/bootstrap.cpp +++ b/src/bootstrap.cpp @@ -13,7 +13,6 @@ #include "interfaces/status_manager.hpp" #include "interfaces/statusline.hpp" #include "interfaces/statusline_subscriber_adapter.hpp" -#include "interfaces/window.hpp" // Implementations #include "argument_parser.hpp" @@ -23,7 +22,6 @@ #include "engine/graphics/matrix.hpp" #include "engine/graphics/scene.hpp" #include "engine/graphics/statusline.hpp" -#include "engine/graphics/window.hpp" #include "engine/user/cursor.hpp" #include "engine/user/input.hpp" #include "game/game.hpp" @@ -49,17 +47,15 @@ auto bootstrap() noexcept -> yacppdic::Container container.bind<IInputHandler>().to<InputHandler>(); container.bind<ICursorController>().to<CursorController>(); container.bind<ICLIGameEngine>().to<CLIGameEngine>(); - container.bind<IWindow>().to<Window>(); container.bind<ISeedGenerator>().to<SeedGenerator>(); container.bind<IGameFactory>().to_factory( [&container]( - const std::shared_ptr<IWindow> &window, const std::shared_ptr<IScene> &scene, const std::shared_ptr<ICursorController> &cursor_controller) { std::shared_ptr<IStatusLine> statusline = - container.get<IStatusLineFactory>()(cursor_controller, window); + container.get<IStatusLineFactory>()(cursor_controller, scene); std::shared_ptr<IStatusManager> status_manager = container.get<IStatusManagerFactory>()(statusline); @@ -71,7 +67,6 @@ auto bootstrap() noexcept -> yacppdic::Container container.get<IStatusLineSubscriberAdapterFactory<Vector2>>(); return std::make_unique<Game>( - window, scene, cursor_controller, statusline, @@ -93,20 +88,18 @@ auto bootstrap() noexcept -> yacppdic::Container }); container.bind<ISceneFactory>().to_factory( - [&container]( - const std::shared_ptr<ICursorController> &cursor_controller, - const std::shared_ptr<IWindow> &window) + [&container](const std::shared_ptr<ICursorController> &cursor_controller) { auto matrix_factory = container.get<IMatrixFactory<std::string_view>>(); - return std::make_unique<Scene>(matrix_factory, cursor_controller, window); + return std::make_unique<Scene>(matrix_factory, cursor_controller); }); container.bind<IStatusLineFactory>().to_factory( [](const std::shared_ptr<ICursorController> &cursor_controller, - const std::shared_ptr<IWindow> &window) + const std::shared_ptr<IScene> &scene) { - return std::make_unique<StatusLine>(cursor_controller, window); + return std::make_unique<StatusLine>(cursor_controller, scene); }); container.bind<IStatusManagerFactory>().to_factory( |