Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
Actions.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "RuleTypes.hpp"
4
5#include <array>
6#include <cstdint>
7#include <vector>
8
10{
11 enum class Type : std::uint16_t
12 {
13 Null = 0,
15 Tick = 2,
16 RandomSeed = 3,
17 RestartPhase = 4,
18 ResyncClient = 5,
19 NewGame = 6,
21 SetGameState = 8,
22 NamePlayer = 9,
24 StartGame = 11,
25 StartTurn = 12,
26 EndTurn = 13,
27 RollDice = 14,
28 CheatRollDice = 15,
29 CheatCash = 16,
30 CheatOwner = 17,
32 MoveForwards = 19,
33 MoveBackwards = 20,
34 JumpToSquare = 21,
35 LandedOnSquare = 22,
37 CardSeen = 24,
38 GoBankrupt = 25,
40 Bid = 27,
42 BuyHouse = 29,
43 SellBuildings = 30,
44 Mortgaging = 31,
45 TaxDecision = 32,
47 ClearTradeItems = 34,
48 TradeItem = 35,
50 TradeAccept = 37,
51 VoiceChat = 38,
52 TextChat = 39,
60 UpdateTradeInfo = 47,
61 PauseGame = 48,
62 IAmHere = 49,
64
72 NotifyEndTurn = 87,
73 NotifyStartTurn = 88,
80 NotifyPassedGo = 95,
83 NotifyPleasePay = 98,
92 NotifyNewHighBid = 107,
99 NotifyTradeItem = 114,
100 NotifyTradeEditor = 115,
103 NotifyVoiceChat = 118,
104 NotifyTextChat = 119,
106 NotifyAIParameters = 121,
112 NotifyGameOver = 127,
113 NotifyGameStarting = 128,
116 NotifyNextMove = 131,
118 NotifyGamePaused = 133,
122 };
123
124 struct Message
125 {
127
130
133
134 std::int64_t numberA = 0;
135 std::int64_t numberB = 0;
136 std::int64_t numberC = 0;
137 std::int64_t numberD = 0;
138 std::int64_t numberE = 0;
139
140 std::array<wchar_t, 80> stringA{};
141
142 std::vector<std::uint8_t> binaryData;
143 std::vector<std::uint8_t> binaryDataA{};
144
145 // Ingress metadata assigned by MESS. Zero denotes the local host;
146 // remote IDs are unique for the lifetime of the host session.
147 // Never serialized as client-controlled message content.
148 std::uint32_t sourceId = 0;
149 };
150}
151
152
153
154
std::uint8_t PlayerNumber
Definition RuleTypes.hpp:12
constexpr PlayerNumber NobodyPlayer
Definition RuleTypes.hpp:16
rules::PlayerNumber toPlayer
Definition Actions.hpp:131
std::vector< std::uint8_t > binaryData
Definition Actions.hpp:142
rules::PlayerNumber fromPlayer
Definition Actions.hpp:128
std::vector< std::uint8_t > binaryDataA
Definition Actions.hpp:143
std::array< wchar_t, 80 > stringA
Definition Actions.hpp:140