aboutsummaryrefslogtreecommitdiff
path: root/src/bootstrap.cpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-02-27 17:12:49 +0100
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:53 +0200
commitfe79577396231f2edb7927f1f61ce814f03851a7 (patch)
treed353a1caa449ec772dcf9a8681084fc2d6e64116 /src/bootstrap.cpp
parent6964d48c970e5f7b11897096c816271785af23ac (diff)
add basic engine graphics
Diffstat (limited to 'src/bootstrap.cpp')
-rw-r--r--src/bootstrap.cpp21
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;
}