Monopoly — Portage moderne
0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
RuleResync.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include "
RuleArchive.hpp
"
4
#include "
RuleTypes.hpp
"
5
6
namespace
monopoly::rules::resync
7
{
8
enum class
Cause
: std::uint8_t
9
{
10
NetworkRefresh
= 0,
11
GameStart
= 1,
12
LoadGame
= 2,
13
UndoBankruptcy
= 3,
14
UndoHotelDecomposition
= 4
15
};
16
17
18
// Only the compact mutable client state; no identity/configuration or restart.
19
void
sendClientState
(
const
GameState
&
state
,
PlayerNumber
toPlayer,
Cause
cause);
20
21
void
sendAll
(
22
const
GameState
&
state
,
23
PlayerNumber
toPlayer,
24
Cause
cause,
25
const
archive::AIStateArray
&
aiStates
26
);
27
}
index
unsigned index
Definition
ModernIBarSkin.cpp:25
RuleArchive.hpp
RuleTypes.hpp
monopoly::rules::archive::AIStateArray
std::array< std::vector< std::uint8_t >, MaxPlayers > AIStateArray
Definition
RuleArchive.hpp:16
monopoly::rules::resync
Definition
RuleResync.cpp:11
monopoly::rules::resync::Cause
Cause
Definition
RuleResync.hpp:9
monopoly::rules::resync::Cause::LoadGame
@ LoadGame
monopoly::rules::resync::Cause::NetworkRefresh
@ NetworkRefresh
monopoly::rules::resync::Cause::GameStart
@ GameStart
monopoly::rules::resync::Cause::UndoBankruptcy
@ UndoBankruptcy
monopoly::rules::resync::Cause::UndoHotelDecomposition
@ UndoHotelDecomposition
monopoly::rules::resync::sendClientState
void sendClientState(const GameState &state, PlayerNumber toPlayer, Cause cause)
Definition
RuleResync.cpp:239
monopoly::rules::resync::sendAll
void sendAll(const GameState &state, PlayerNumber toPlayer, Cause cause, const archive::AIStateArray &aiStates)
Definition
RuleResync.cpp:266
monopoly::rules::PlayerNumber
std::uint8_t PlayerNumber
Definition
RuleTypes.hpp:12
monopoly::rules::state
const GameState & state()
Definition
RulesEngine.cpp:662
monopoly::rules::GameState
Definition
RuleTypes.hpp:259
RuleResync.hpp
Generated by
1.9.8