From 9dd5936333082305b0b9680db2eac9abd128129b Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 8 Mar 2022 16:26:17 +0100 Subject: refactor: add game factory --- src/bootstrap.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/bootstrap.cpp') diff --git a/src/bootstrap.cpp b/src/bootstrap.cpp index ddeba4d..610945f 100644 --- a/src/bootstrap.cpp +++ b/src/bootstrap.cpp @@ -24,6 +24,8 @@ #include "randomization/generator.hpp" #include "randomization/seed_generator.hpp" +#include "util/function.hpp" + #include #include #include @@ -40,6 +42,12 @@ Container bootstrap() container.bind().to(); container.bind().to(); + container.bind().to_factory(normalize_lambda( + [&container]() + { + return container.get(); + })); + container.bind().to_factory( [](const uint32_t &seed) { -- cgit v1.2.3-18-g5258