diff options
author | HampusM <hampus@hampusmat.com> | 2022-03-06 13:16:05 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:54 +0200 |
commit | 0e40bc7ce8c3b3be083002f88c3317d65f6570ad (patch) | |
tree | 2fcc470a0f1ce1d51ff26c53c8a9a890b3f31b3b /src/bootstrap.cpp | |
parent | f4d812a5b9131e65bb55db7211dc68fc453792df (diff) |
refactor: make vector2 & bounds data classes
Diffstat (limited to 'src/bootstrap.cpp')
-rw-r--r-- | src/bootstrap.cpp | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/bootstrap.cpp b/src/bootstrap.cpp index 343f01b..a0d8ab2 100644 --- a/src/bootstrap.cpp +++ b/src/bootstrap.cpp @@ -2,7 +2,6 @@ // Interfaces #include "interfaces/argument_parser.hpp" -#include "interfaces/bounds.hpp" #include "interfaces/game.hpp" #include "interfaces/game_initializer.hpp" #include "interfaces/input.hpp" @@ -10,15 +9,14 @@ #include "interfaces/matrix.hpp" #include "interfaces/randomization.hpp" #include "interfaces/scene.hpp" -#include "interfaces/vector2.hpp" // Implementations #include "argument_parser.hpp" +#include "engine/data/bounds.hpp" +#include "engine/data/vector2.hpp" #include "engine/game_initializer.hpp" -#include "engine/graphics/bounds.hpp" #include "engine/graphics/scene.hpp" #include "engine/graphics/string_matrix.hpp" -#include "engine/graphics/vector2.hpp" #include "engine/user/cursor.hpp" #include "engine/user/input.hpp" #include "game/game.hpp" @@ -56,25 +54,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)); - }); - container.bind<IMatrixFactory<std::string_view>>().to_factory( - [](const IBounds &bounds) + [](const Bounds &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; } |