Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
IBarCurrentPlayerPlayback.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "DataBanks.hpp"
4#include "RuleTypes.hpp"
6
7#include <cstdint>
8#include <expected>
9#include <string>
10
11namespace monopoly::ibar
12{
13 inline constexpr data::DataTag CurrentPlayerTokenBaseTag = 0x005F;
14 inline constexpr std::uint16_t CurrentPlayerTokenPriority = 258;
15 inline constexpr std::int32_t CurrentPlayerTokenX = 0;
16 inline constexpr std::int32_t CurrentPlayerTokenY = -4;
17 inline constexpr std::uint8_t LoopToBeginning = 3;
18
19 [[nodiscard]] std::expected<data::DataId, std::string>
22 bool visible);
23
25 {
26 public:
27 [[nodiscard]] std::expected<void, std::string> sync(
29 bool visible,
31
33 {
34 currentToken_ = data::EmptyDataId;
35 }
36
38 {
39 return currentToken_;
40 }
41
42 private:
43 data::DataId currentToken_{data::EmptyDataId};
44 };
45}
unsigned index
std::expected< void, std::string > sync(const rules::GameState &state, bool visible, engine::SequencePlayback &playback)
std::uint32_t DataId
Definition DataBanks.hpp:10
constexpr DataId EmptyDataId
Definition DataBanks.hpp:13
std::uint16_t DataTag
Definition DataBanks.hpp:11
constexpr std::int32_t CurrentPlayerTokenY
constexpr std::uint8_t LoopToBeginning
std::expected< data::DataId, std::string > desiredCurrentPlayerToken(const rules::GameState &state, bool visible)
constexpr std::uint16_t CurrentPlayerTokenPriority
constexpr std::int32_t CurrentPlayerTokenX
State & state()
Definition IBar.cpp:1285
constexpr data::DataTag CurrentPlayerTokenBaseTag