diff options
author | HampusM <hampus@hampusmat.com> | 2022-02-27 15:24:07 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:53 +0200 |
commit | 2bcf699b9e11ccf848393882257fc3986bd28e45 (patch) | |
tree | a7ea1033984a857812297b0b41bd322c57a3b23f /src/bootstrap.cpp | |
parent | 5864e5abc43b201c3801fa39a2fcaf9e3a9e8914 (diff) |
add game & vector2
Diffstat (limited to 'src/bootstrap.cpp')
-rw-r--r-- | src/bootstrap.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/bootstrap.cpp b/src/bootstrap.cpp index 85498bc..ce07621 100644 --- a/src/bootstrap.cpp +++ b/src/bootstrap.cpp @@ -2,10 +2,14 @@ // Interfaces #include "interfaces/argument_parser.hpp" +#include "interfaces/game.hpp" #include "interfaces/randomization.hpp" +#include "interfaces/vector2.hpp" // Implementations #include "argument_parser.hpp" +#include "engine/graphics/vector2.hpp" +#include "game/game.hpp" #include "randomization/generator.hpp" #include "randomization/seed_generator.hpp" @@ -17,6 +21,7 @@ Container bootstrap() auto container = Container(); container.bind<IArgumentParser>().to<ArgumentParser>(); + container.bind<IGame>().to<Game>(); container.bind<IRandomNumberGeneratorFactory>().to_factory( [](const unsigned int &seed) @@ -32,5 +37,12 @@ Container bootstrap() std::make_shared<SeedGenerator>(std::make_unique<std::random_device>())); }); + container.bind<IVector2Factory>().to_factory( + [](const IVector2Options &options) + { + return std::dynamic_pointer_cast<IVector2>( + std::make_shared<Vector2>(options)); + }); + return container; } |