Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
UserInterface.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "UIMessages.hpp"
4#include "Actions.hpp"
5#include "RuleTypes.hpp"
8#include "DiceIngress.hpp"
9#include "IBarRuleState.hpp"
10#include "AuctionUI.hpp"
11#include "TradeUI.hpp"
12#include "OptionsUI.hpp"
15#include "StatsUI.hpp"
16#include "StatsCalculatorUI.hpp"
18
19#include <cstdint>
20#include <expected>
21#include <optional>
22#include <string>
23
25{
26 dice::PromptState& dicePromptState() noexcept;
27 const ibar::RuleProjection& iBarRuleStateReadOnly() noexcept;
28 auctionui::State& auctionState() noexcept;
29 const auctionui::State& auctionStateReadOnly() noexcept;
30 tradeui::State& tradeState() noexcept;
31 const tradeui::State& tradeStateReadOnly() noexcept;
32 optionsui::State& optionsState() noexcept;
33 const optionsui::State& optionsStateReadOnly() noexcept;
34 [[nodiscard]] rules::PlayerNumber chatSenderPlayer() noexcept;
35 optionsui::SaveRuntimeState& optionsSaveState() noexcept;
36 const optionsui::SaveRuntimeState& optionsSaveStateReadOnly() noexcept;
37 optionsui::CustomBoardState& optionsCustomBoardState() noexcept;
38 const optionsui::CustomBoardState& optionsCustomBoardStateReadOnly() noexcept;
39 statsui::State& statsState() noexcept;
40 const statsui::State& statsStateReadOnly() noexcept;
41 statsui::CalculatorUIState& statsCalculatorState() noexcept;
42 const statsui::CalculatorUIState& statsCalculatorStateReadOnly() noexcept;
43 statsui::FutureImmunityState& statsFutureImmunityState() noexcept;
44 const statsui::FutureImmunityState& statsFutureImmunityStateReadOnly() noexcept;
45 [[nodiscard]] bool beginTradeFromIBar(rules::PlayerNumber iBarPlayer) noexcept;
47 [[nodiscard]] std::expected<void, std::string> sendReadyResponses(
49 std::int64_t serial);
50 // Repart d'une projection UI neuve et réarme l'initialisation spéciale
51 // déclenchée par la première notification du nombre de joueurs.
53
54
56 const actions::Message& message
57 );
58
59
60 rules::GameState& ruleState();
61
62
63 const rules::GameState& ruleStateReadOnly();
64
65 const pieces::PieceIdleState& pieceIdleStateReadOnly();
66 [[nodiscard]] std::optional<pieces::PieceMovePlan> takePendingPieceMovePlan();
67 [[nodiscard]] std::optional<pieces::PieceMoveSpecialRequest> takePendingPieceMoveSpecial();
68 [[nodiscard]] std::optional<pieces::PieceIdleTransitionPlan> takePendingPieceIdleTransitionPlan();
69 [[nodiscard]] std::optional<dice::RollRequest> takePendingDiceRoll();
70
71
72 // ProcessPlayersUI(NULL) original: laisse les modules UI actifs
73 // terminer leurs transitions sans court-circuiter cette frontiere.
74 void update();
75
76
77 bool processUIMessage(const uimsg::Message& message);
78}
79
unsigned index
optionsui::CustomBoardState & optionsCustomBoardState() noexcept
bool processUIMessage(const uimsg::Message &message)
rules::PlayerNumber chatSenderPlayer() noexcept
const optionsui::CustomBoardState & optionsCustomBoardStateReadOnly() noexcept
statsui::FutureImmunityState & statsFutureImmunityState() noexcept
std::expected< void, std::string > sendReadyResponses(std::uint32_t playerMask, std::int64_t serial)
const rules::GameState & ruleStateReadOnly()
std::optional< pieces::PieceMoveSpecialRequest > takePendingPieceMoveSpecial()
const optionsui::State & optionsStateReadOnly() noexcept
const optionsui::SaveRuntimeState & optionsSaveStateReadOnly() noexcept
const statsui::State & statsStateReadOnly() noexcept
bool beginTradeFromIBar(rules::PlayerNumber iBarPlayer) noexcept
statsui::CalculatorUIState & statsCalculatorState() noexcept
auctionui::State & auctionState() noexcept
bool beginOptionsFromIBar() noexcept
std::optional< pieces::PieceMovePlan > takePendingPieceMovePlan()
void processRuleMessage(const actions::Message &message)
std::optional< pieces::PieceIdleTransitionPlan > takePendingPieceIdleTransitionPlan()
const pieces::PieceIdleState & pieceIdleStateReadOnly()
const statsui::FutureImmunityState & statsFutureImmunityStateReadOnly() noexcept
std::optional< dice::RollRequest > takePendingDiceRoll()
const tradeui::State & tradeStateReadOnly() noexcept
statsui::State & statsState() noexcept
dice::PromptState & dicePromptState() noexcept
rules::GameState & ruleState()
tradeui::State & tradeState() noexcept
const ibar::RuleProjection & iBarRuleStateReadOnly() noexcept
optionsui::SaveRuntimeState & optionsSaveState() noexcept
const auctionui::State & auctionStateReadOnly() noexcept
const statsui::CalculatorUIState & statsCalculatorStateReadOnly() noexcept
optionsui::State & optionsState() noexcept