diff options
Diffstat (limited to 'src/bootstrap.cpp')
-rw-r--r-- | src/bootstrap.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/bootstrap.cpp b/src/bootstrap.cpp index ce07621..8a8aa25 100644 --- a/src/bootstrap.cpp +++ b/src/bootstrap.cpp @@ -2,12 +2,18 @@ // Interfaces #include "interfaces/argument_parser.hpp" +#include "interfaces/bounds.hpp" #include "interfaces/game.hpp" +#include "interfaces/matrix.hpp" #include "interfaces/randomization.hpp" +#include "interfaces/scene.hpp" #include "interfaces/vector2.hpp" // Implementations #include "argument_parser.hpp" +#include "engine/graphics/bounds.hpp" +#include "engine/graphics/scene.hpp" +#include "engine/graphics/string_matrix.hpp" #include "engine/graphics/vector2.hpp" #include "game/game.hpp" #include "randomization/generator.hpp" @@ -15,6 +21,7 @@ #include <memory> #include <random> +#include <string_view> Container bootstrap() { @@ -22,6 +29,7 @@ Container bootstrap() container.bind<IArgumentParser>().to<ArgumentParser>(); container.bind<IGame>().to<Game>(); + container.bind<IScene>().to<Scene>(); container.bind<IRandomNumberGeneratorFactory>().to_factory( [](const unsigned int &seed) @@ -44,5 +52,18 @@ Container bootstrap() std::make_shared<Vector2>(options)); }); + container.bind<IMatrixFactory<std::string_view>>().to_factory( + [](const IBounds &bounds) + { + return std::dynamic_pointer_cast<IMatrix<std::string_view>>( + std::make_shared<StringMatrix>(bounds)); + }); + + container.bind<IBoundsFactory>().to_factory( + [](const IBoundsOptions &options) + { + return std::dynamic_pointer_cast<IBounds>(std::make_shared<Bounds>(options)); + }); + return container; } |