#include "bootstrap.hpp" // Interfaces #include "interfaces/cell_helper.hpp" #include "interfaces/component.hpp" #include "interfaces/component_renderer.hpp" #include "interfaces/cursor.hpp" #include "interfaces/engine.hpp" #include "interfaces/game.hpp" #include "interfaces/generation_tracker.hpp" #include "interfaces/input.hpp" #include "interfaces/matrix.hpp" #include "interfaces/scene.hpp" #include "interfaces/status_manager.hpp" #include "interfaces/statusline.hpp" // Implementations #include "engine/components/statusline.hpp" #include "engine/data/bounds.hpp" #include "engine/data/vector2.hpp" #include "engine/engine.hpp" #include "engine/graphics/component_renderer.hpp" #include "engine/graphics/matrix.hpp" #include "engine/graphics/scene.hpp" #include "engine/user/cursor.hpp" #include "engine/user/input.hpp" #include "game/cell_helper.hpp" #include "game/game.hpp" #include "game/generation_tracker.hpp" #include "game/status_manager.hpp" #include auto bootstrap() noexcept -> yacppdic::Container { auto container = yacppdic::Container(); container.bind().to(); container.bind().to(); container.bind().to(); container.bind().to(); container.bind().to_factory( [&container]( const std::shared_ptr &scene, const std::shared_ptr &cursor_controller, const std::shared_ptr &user_input_observer) { const auto statusline_factory = container.get(); std::shared_ptr status_manager = container.get(); std::shared_ptr generation_tracker = container.get()(true); const auto cell_helper_factory = container.get>(); return std::make_unique( statusline_factory, scene, cursor_controller, generation_tracker, status_manager, user_input_observer, cell_helper_factory(*(scene->get_matrix()))); }); container.bind>().to_factory( [](const Bounds &bounds) { return std::make_unique>(bounds); }); container.bind().to_factory( [&container](const std::shared_ptr &cursor_controller) { auto matrix_factory = container.get>(); return std::make_unique(matrix_factory, cursor_controller); }); container.bind().to_factory( [&container](const Bounds &size) { const auto matrix_factory = container.get>(); return std::make_unique(matrix_factory(size)); }); container.bind().to_factory( [](bool is_paused) { return std::make_unique(is_paused); }); container.bind>().to_factory( [](const IMatrix &matrix) { return std::make_unique>(matrix); }); container.bind().to_factory( [](const std::shared_ptr &cursor_controller) { return std::make_unique(cursor_controller); }); return container; }