Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
StatsDeedPlayback.hpp
Go to the documentation of this file.
1#pragma once
2
4
5#include <cstddef>
6#include <cstdint>
7#include <expected>
8#include <string>
9#include <vector>
10
11namespace monopoly::statsui
12{
13 inline constexpr std::uint16_t DeedGridPriority = 510;
14 inline constexpr int DeedGridX = 22;
15 inline constexpr int DeedGridY = 234;
16 inline constexpr int DeedGridColumnStep = 110;
17 inline constexpr int DeedGridRowStep = 54;
18 inline constexpr int DeedGridColumns = 7;
19
21 {
22 public:
23 struct Published
24 {
25 int square{-1};
27 std::uint16_t priority{};
28 int x{};
29 int y{};
30 friend bool operator==(const Published&, const Published&) = default;
31 };
32 [[nodiscard]] std::expected<void, std::string> sync(
37
38 void reset() noexcept { current_.clear(); }
40 {
41 return current_.size();
42 }
43
44 private:
45 std::vector<Published> current_;
46 };
47
48 [[nodiscard]] std::expected<std::vector<DeedPlayback::Published>, std::string>
49 planDeedGrid(const State& state, const rules::GameState& gameState,
50 const PlayerPlaybackInputs& inputs);
51}
unsigned state
unsigned index
std::expected< void, std::string > sync(const State &state, const rules::GameState &gameState, const PlayerPlaybackInputs &inputs, display::Screen2D desiredView, engine::SequencePlayback &playback)
std::size_t objectCount() const noexcept
std::uint32_t DataId
Definition DataBanks.hpp:10
constexpr DataId EmptyDataId
Definition DataBanks.hpp:13
constexpr int DeedGridColumns
constexpr int DeedGridColumnStep
std::expected< std::vector< DeedPlayback::Published >, std::string > planDeedGrid(const State &state, const rules::GameState &gameState, const PlayerPlaybackInputs &inputs)
constexpr std::uint16_t DeedGridPriority
constexpr int DeedGridRowStep
friend bool operator==(const Published &, const Published &)=default