diff options
Diffstat (limited to 'src/bootstrap.cpp')
-rw-r--r-- | src/bootstrap.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/bootstrap.cpp b/src/bootstrap.cpp index 2e64986..8aeba85 100644 --- a/src/bootstrap.cpp +++ b/src/bootstrap.cpp @@ -3,25 +3,25 @@ // Interfaces #include "interfaces/argument_parser.hpp" #include "interfaces/cursor.hpp" +#include "interfaces/engine.hpp" #include "interfaces/game.hpp" -#include "interfaces/game_initializer.hpp" #include "interfaces/input.hpp" -#include "interfaces/input_configurator.hpp" #include "interfaces/matrix.hpp" #include "interfaces/randomization.hpp" #include "interfaces/scene.hpp" +#include "interfaces/window.hpp" // Implementations #include "argument_parser.hpp" #include "engine/data/bounds.hpp" #include "engine/data/vector2.hpp" -#include "engine/game_initializer.hpp" +#include "engine/engine.hpp" #include "engine/graphics/scene.hpp" #include "engine/graphics/string_matrix.hpp" +#include "engine/graphics/window.hpp" #include "engine/user/cursor.hpp" #include "engine/user/input.hpp" #include "game/game.hpp" -#include "game/input_configurator.hpp" #include "randomization/generator.hpp" #include "randomization/seed_generator.hpp" @@ -37,11 +37,10 @@ Container bootstrap() container.bind<IArgumentParser>().to<ArgumentParser>(); container.bind<IGame>().to<Game>(); - container.bind<IScene>().to<Scene>(); container.bind<IInputHandler>().to<InputHandler>(); container.bind<ICursorController>().to<CursorController>(); - container.bind<IGameInitializer>().to<GameInitializer>(); - container.bind<IInputConfigurator>().to<InputConfigurator>(); + container.bind<ICLIGameEngine>().to<CLIGameEngine>(); + container.bind<IWindow>().to<Window>(); container.bind<IGameFactory>().to_factory(normalize_lambda( [&container]() @@ -70,5 +69,12 @@ Container bootstrap() std::make_shared<StringMatrix>(bounds)); }); + container.bind<ISceneFactory>().to_factory(normalize_lambda( + [&container]() + { + return std::dynamic_pointer_cast<IScene>(std::make_shared<Scene>( + container.get<IMatrixFactory<std::string_view>>())); + })); + return container; } |