Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
IBarScoreTextPlayback.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "DataBanks.hpp"
6
7#include <array>
8#include <cstdint>
9#include <expected>
10#include <optional>
11#include <string>
12
13namespace monopoly::fonts { class Runtime; }
14
15namespace monopoly::ibar
16{
18 {
19 public:
20 [[nodiscard]] std::expected<void, std::string> sync(
21 const ScoreStripPlan& plan,
22 const std::array<ScoreTextState, rules::MaxPlayers>& textStates,
23 int monetarySystem,
24 data::BoardEdition edition,
26 engine::SequencePlayback& playback, bool presentation = false);
27
28 void reset() noexcept;
29
30 private:
31 struct Published
32 {
33 bool visible{};
34 int x{};
35 int y{};
36 bool operator==(const Published&) const = default;
37 };
38
39 [[nodiscard]] std::expected<void, std::string> ensureSurface(
40 std::size_t player,
42
43 std::array<std::optional<data::DataId>, rules::MaxPlayers> surfaces_{};
44 std::array<std::optional<std::string>, rules::MaxPlayers> cache_{};
45 std::array<Published, rules::MaxPlayers> published_{};
46 };
47}
decision::EconomicActionPlan plan
unsigned index
std::expected< void, std::string > sync(const ScoreStripPlan &plan, const std::array< ScoreTextState, rules::MaxPlayers > &textStates, int monetarySystem, data::BoardEdition edition, fonts::Runtime *fontRuntime, engine::SequencePlayback &playback, bool presentation=false)
constexpr PlayerNumber MaxPlayers
Definition RuleTypes.hpp:14