From fb080f6fb911b1831c176a06259e384772541dd5 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 2 May 2022 22:36:21 +0200 Subject: refactor: seperate statusline related concerns --- src/game/status_updater.cpp | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 src/game/status_updater.cpp (limited to 'src/game/status_updater.cpp') diff --git a/src/game/status_updater.cpp b/src/game/status_updater.cpp deleted file mode 100644 index 1cfd1d2..0000000 --- a/src/game/status_updater.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "status_updater.hpp" - -#include -#include - -StatusUpdater::StatusUpdater( - std::shared_ptr statusline, - std::shared_ptr generation_tracker -) noexcept - : _statusline(std::move(statusline)), - _generation_tracker(std::move(generation_tracker)) -{ -} - -void StatusUpdater::update(const Vector2 &context) noexcept -{ - _statusline->set_status( - StatusLineSection::A, - fmt::format("X: {} Y {}", context.get_x(), context.get_y()) - ); - - _statusline->set_status( - StatusLineSection::B, - fmt::format( - "Paused: {} Generation: {}", - _generation_tracker->get_is_paused() ? "yes" : "no", - _generation_tracker->get_current_generation() - ) - ); -} -- cgit v1.2.3-18-g5258