From 18e1db1fb8692752f64d3912c3b5ff1818be9028 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 23 May 2022 18:12:39 +0200 Subject: refactor: replace last subscriber patterned code --- src/bootstrap.cpp | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) (limited to 'src/bootstrap.cpp') diff --git a/src/bootstrap.cpp b/src/bootstrap.cpp index 6d42263..ef54940 100644 --- a/src/bootstrap.cpp +++ b/src/bootstrap.cpp @@ -12,7 +12,6 @@ #include "interfaces/scene.hpp" #include "interfaces/status_manager.hpp" #include "interfaces/statusline.hpp" -#include "interfaces/statusline_subscriber_adapter.hpp" // Implementations #include "argument_parser.hpp" @@ -27,7 +26,6 @@ #include "game/game.hpp" #include "game/generation_tracker.hpp" #include "game/status_manager.hpp" -#include "game/statusline_subscriber_adapter.hpp" #include "randomization/generator.hpp" #include "randomization/seed_generator.hpp" @@ -64,16 +62,12 @@ auto bootstrap() noexcept -> yacppdic::Container std::shared_ptr generation_tracker = container.get()(true); - auto vector2_statusline_subscriber_adapter_factory = - container.get>(); - return std::make_unique( scene, cursor_controller, generation_tracker, status_manager, - user_input_observer, - vector2_statusline_subscriber_adapter_factory); + user_input_observer); }); container.bind().to_factory( @@ -109,27 +103,6 @@ auto bootstrap() noexcept -> yacppdic::Container return std::make_unique(statusline); }); - container.bind>().to_factory( - [](const std::shared_ptr &status_manager, - std::vector sections) - { - return std::make_unique>( - status_manager, - [](std::size_t section_index, const Vector2 &position) - { - switch (section_index) - { - case 0: - return fmt::format("{}", position.get_x()); - case 1: - return fmt::format("{}", position.get_y()); - default: - return std::string(""); - } - }, - sections); - }); - container.bind().to_factory( [](bool is_paused) { -- cgit v1.2.3-18-g5258