diff options
author | HampusM <hampus@hampusmat.com> | 2022-05-02 22:36:21 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-06-13 17:56:58 +0200 |
commit | fb080f6fb911b1831c176a06259e384772541dd5 (patch) | |
tree | e18140e700cd974f84a5630f41fcb0b496b7e772 /src/game/status_updater.cpp | |
parent | 40d02748924aa7c48b04cf948204d8dacdfbbc74 (diff) |
refactor: seperate statusline related concerns
Diffstat (limited to 'src/game/status_updater.cpp')
-rw-r--r-- | src/game/status_updater.cpp | 30 |
1 files changed, 0 insertions, 30 deletions
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 <fmt/core.h> -#include <utility> - -StatusUpdater::StatusUpdater( - std::shared_ptr<IStatusLine> statusline, - std::shared_ptr<IGenerationTracker> 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() - ) - ); -} |