aboutsummaryrefslogtreecommitdiff
path: root/src/bootstrap.cpp
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-05-22 23:13:29 +0200
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:59 +0200
commitb74611d2b20fc071b8a699f2ce25e61f60118d6e (patch)
tree55d4dbf727724f7f527f2acebea83abd34317329 /src/bootstrap.cpp
parentb1183c712d94d38f75068bd62df006f73bd3550f (diff)
refactor: improve input handling & remove commands
Diffstat (limited to 'src/bootstrap.cpp')
-rw-r--r--src/bootstrap.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bootstrap.cpp b/src/bootstrap.cpp
index 14aa922..6d42263 100644
--- a/src/bootstrap.cpp
+++ b/src/bootstrap.cpp
@@ -44,7 +44,7 @@ auto bootstrap() noexcept -> yacppdic::Container
auto container = yacppdic::Container();
container.bind<IArgumentParser>().to<ArgumentParser>();
- container.bind<IInputHandler>().to<InputHandler>();
+ container.bind<IUserInputObserver>().to<UserInputObserver>();
container.bind<ICursorController>().to<CursorController>();
container.bind<ICLIGameEngine>().to<CLIGameEngine>();
container.bind<ISeedGenerator>().to<SeedGenerator>();
@@ -52,7 +52,8 @@ auto bootstrap() noexcept -> yacppdic::Container
container.bind<IGameFactory>().to_factory(
[&container](
const std::shared_ptr<IScene> &scene,
- const std::shared_ptr<ICursorController> &cursor_controller)
+ const std::shared_ptr<ICursorController> &cursor_controller,
+ const std::shared_ptr<IUserInputObserver> user_input_observer)
{
std::shared_ptr<IStatusLine> statusline =
container.get<IStatusLineFactory>()(cursor_controller, scene);
@@ -71,6 +72,7 @@ auto bootstrap() noexcept -> yacppdic::Container
cursor_controller,
generation_tracker,
status_manager,
+ user_input_observer,
vector2_statusline_subscriber_adapter_factory);
});