Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
monopoly::rules Namespace Reference

Namespaces

namespace  archive
 
namespace  auction
 
namespace  board
 
namespace  buildings
 
namespace  cardruntime
 
namespace  cards
 
namespace  configuration
 
namespace  coreactions
 
namespace  economy
 
namespace  gamestart
 
namespace  initialdeal
 
namespace  jail
 
namespace  lifecycle
 
namespace  options
 
namespace  phases
 
namespace  players
 
namespace  prediction
 
namespace  random
 
namespace  rejections
 
namespace  resync
 
namespace  ruleactions
 
namespace  save
 
namespace  startingorder
 
namespace  sync
 
namespace  trade
 
namespace  turnactions
 

Classes

struct  AuctionState
 
struct  CardDeck
 
struct  CountHitRecord
 
struct  GameOptions
 
struct  GameState
 
struct  PendingPhase
 
struct  PlayerState
 
struct  SquareState
 
struct  VoiceChatOptions
 

Typedefs

using PlayerNumber = std::uint8_t
 

Enumerations

enum class  CardType : std::uint8_t {
  None = 0 , ChanceGoDirectlyToGo = 1 , ChanceGoToStCharlesPlace , ChanceGoToNearestUtility ,
  ChanceGet150FromBank , ChanceGet50FromBank , ChancePay50ToEachPlayer , ChanceGoToBoardwalk ,
  ChanceGoToReadingRailroad , ChanceGoToNearestRailroadPayDouble1 , ChanceGoToNearestRailroadPayDouble2 , ChancePay25EachHouse100EachHotel ,
  ChanceGetOutOfJailFree , ChancePay15ToBank , ChanceGoToIllinoisAvenue , ChanceGoDirectlyToJail ,
  ChanceGoBackThreeSpaces , CommunityGet100FromBank1 = 65 , CommunityGet100FromBank2 , CommunityGet100FromBank3 ,
  CommunityGet10FromBank , CommunityGetOutOfJailFree , CommunityPay50ToBank , CommunityGet200FromBank ,
  CommunityGet20FromBank , CommunityPay40EachHouse115EachHotel , CommunityGoDirectlyToJail , CommunityGet45FromBank ,
  CommunityGet50FromEachPlayer , CommunityGoDirectlyToGo , CommunityPay150ToBank , CommunityGet25FromBank ,
  CommunityPay100ToBank
}
 
enum class  DeckType : std::uint8_t { Chance = 0 , Community , Count }
 
enum class  TradeItemKind : std::uint8_t {
  Cash = 0 , Square , JailCard , Immunity ,
  FutureRent
}
 
enum class  CountHitType : std::uint8_t { Nothing = 0 , RentImmunity , FutureRent }
 
enum class  GamePhase : std::uint8_t {
  AddingNewPlayers = 0 , Configuration , PickingStartingOrder , WaitStartTurn ,
  WaitEndTurn , PreRoll , WaitMoveRoll , MovingToken ,
  WaitJailRoll , WaitUtilityRoll , WaitUntilCardSeen , JailRollOrPayOrCardDecision ,
  GetOutOfJail , FlatOrFractionTaxDecision , AuctionOrBuyDecision , EditingTrade ,
  TradeAcceptance , TradeFinished , Auction , HousingShortageQuestion ,
  CollectingPayment , TransferEscrowProperty , FreeUnmortgage , GameFinished ,
  BuySellMortgage , DecomposeHotel , PlaceBuilding , CollectAIParametersForSave ,
  Paused , WaitForEverybodyReady
}
 

Functions

static void actionNewGame ()
 
bool initialize ()
 
void serviceIdleTick ()
 
void shutdown ()
 
void process (const actions::Message &message)
 
const GameState & state ()
 

Variables

constexpr std::uint8_t ChanceFirst = 1
 
constexpr std::uint8_t ChanceCount = 16
 
constexpr std::uint8_t CommunityFirst = 65
 
constexpr std::uint8_t CommunityCount = 16
 
constexpr std::size_t MaxCardsInDeck = 16
 
constexpr PlayerNumber MaxPlayers = 6
 
constexpr PlayerNumber BankPlayer = MaxPlayers
 
constexpr PlayerNumber NobodyPlayer = MaxPlayers + 1
 
constexpr PlayerNumber AllPlayers = NobodyPlayer
 
constexpr PlayerNumber EscrowPlayer
 
constexpr PlayerNumber SpectatorPlayer
 
constexpr std::size_t SquareCount = 42
 
constexpr std::size_t MaxPlayerNameLength = 39
 
constexpr std::size_t MaxTokens = 11
 
constexpr std::size_t MaxPlayerColours = 6
 
constexpr std::size_t MaxCountHitSets
 
constexpr std::size_t MaxPendingPhases
 

Typedef Documentation

◆ PlayerNumber

Definition at line 12 of file RuleTypes.hpp.

Enumeration Type Documentation

◆ CardType

enum class monopoly::rules::CardType : std::uint8_t
strong
Enumerator
None 
ChanceGoDirectlyToGo 
ChanceGoToStCharlesPlace 
ChanceGoToNearestUtility 
ChanceGet150FromBank 
ChanceGet50FromBank 
ChancePay50ToEachPlayer 
ChanceGoToBoardwalk 
ChanceGoToReadingRailroad 
ChanceGoToNearestRailroadPayDouble1 
ChanceGoToNearestRailroadPayDouble2 
ChancePay25EachHouse100EachHotel 
ChanceGetOutOfJailFree 
ChancePay15ToBank 
ChanceGoToIllinoisAvenue 
ChanceGoDirectlyToJail 
ChanceGoBackThreeSpaces 
CommunityGet100FromBank1 
CommunityGet100FromBank2 
CommunityGet100FromBank3 
CommunityGet10FromBank 
CommunityGetOutOfJailFree 
CommunityPay50ToBank 
CommunityGet200FromBank 
CommunityGet20FromBank 
CommunityPay40EachHouse115EachHotel 
CommunityGoDirectlyToJail 
CommunityGet45FromBank 
CommunityGet50FromEachPlayer 
CommunityGoDirectlyToGo 
CommunityPay150ToBank 
CommunityGet25FromBank 
CommunityPay100ToBank 

Definition at line 9 of file CardTypes.hpp.

◆ CountHitType

enum class monopoly::rules::CountHitType : std::uint8_t
strong
Enumerator
Nothing 
RentImmunity 
FutureRent 

Definition at line 45 of file RuleTypes.hpp.

◆ DeckType

enum class monopoly::rules::DeckType : std::uint8_t
strong
Enumerator
Chance 
Community 
Count 

Definition at line 56 of file CardTypes.hpp.

◆ GamePhase

enum class monopoly::rules::GamePhase : std::uint8_t
strong
Enumerator
AddingNewPlayers 
Configuration 
PickingStartingOrder 
WaitStartTurn 
WaitEndTurn 
PreRoll 
WaitMoveRoll 
MovingToken 
WaitJailRoll 
WaitUtilityRoll 
WaitUntilCardSeen 
JailRollOrPayOrCardDecision 
GetOutOfJail 
FlatOrFractionTaxDecision 
AuctionOrBuyDecision 
EditingTrade 
TradeAcceptance 
TradeFinished 
Auction 
HousingShortageQuestion 
CollectingPayment 
TransferEscrowProperty 
FreeUnmortgage 
GameFinished 
BuySellMortgage 
DecomposeHotel 
PlaceBuilding 
CollectAIParametersForSave 
Paused 
WaitForEverybodyReady 

Definition at line 77 of file RuleTypes.hpp.

◆ TradeItemKind

enum class monopoly::rules::TradeItemKind : std::uint8_t
strong
Enumerator
Cash 
Square 
JailCard 
Immunity 
FutureRent 

Definition at line 35 of file RuleTypes.hpp.

Function Documentation

◆ actionNewGame()

static void monopoly::rules::actionNewGame ( )
static

Definition at line 38 of file RulesEngine.cpp.

◆ initialize()

bool monopoly::rules::initialize ( )

Definition at line 124 of file RulesEngine.cpp.

◆ process()

void monopoly::rules::process ( const actions::Message &  message)

Definition at line 216 of file RulesEngine.cpp.

◆ serviceIdleTick()

void monopoly::rules::serviceIdleTick ( )

Definition at line 173 of file RulesEngine.cpp.

◆ shutdown()

void monopoly::rules::shutdown ( )

Definition at line 211 of file RulesEngine.cpp.

◆ state()

const GameState & monopoly::rules::state ( )

Definition at line 662 of file RulesEngine.cpp.

Variable Documentation

◆ AllPlayers

constexpr PlayerNumber monopoly::rules::AllPlayers = NobodyPlayer
inlineconstexpr

Definition at line 17 of file RuleTypes.hpp.

◆ BankPlayer

constexpr PlayerNumber monopoly::rules::BankPlayer = MaxPlayers
inlineconstexpr

Definition at line 15 of file RuleTypes.hpp.

◆ ChanceCount

constexpr std::uint8_t monopoly::rules::ChanceCount = 16
inlineconstexpr

Definition at line 49 of file CardTypes.hpp.

◆ ChanceFirst

constexpr std::uint8_t monopoly::rules::ChanceFirst = 1
inlineconstexpr

Definition at line 48 of file CardTypes.hpp.

◆ CommunityCount

constexpr std::uint8_t monopoly::rules::CommunityCount = 16
inlineconstexpr

Definition at line 52 of file CardTypes.hpp.

◆ CommunityFirst

constexpr std::uint8_t monopoly::rules::CommunityFirst = 65
inlineconstexpr

Definition at line 51 of file CardTypes.hpp.

◆ EscrowPlayer

constexpr PlayerNumber monopoly::rules::EscrowPlayer
inlineconstexpr
Initial value:
=
static_cast<PlayerNumber>(MaxPlayers + 2)
std::uint8_t PlayerNumber
Definition RuleTypes.hpp:12
constexpr PlayerNumber MaxPlayers
Definition RuleTypes.hpp:14

Definition at line 19 of file RuleTypes.hpp.

◆ MaxCardsInDeck

constexpr std::size_t monopoly::rules::MaxCardsInDeck = 16
inlineconstexpr

Definition at line 54 of file CardTypes.hpp.

◆ MaxCountHitSets

constexpr std::size_t monopoly::rules::MaxCountHitSets
inlineconstexpr
Initial value:
=

Definition at line 53 of file RuleTypes.hpp.

◆ MaxPendingPhases

constexpr std::size_t monopoly::rules::MaxPendingPhases
inlineconstexpr
Initial value:
=
(2 * MaxPlayers) +
6

Definition at line 113 of file RuleTypes.hpp.

◆ MaxPlayerColours

constexpr std::size_t monopoly::rules::MaxPlayerColours = 6
inlineconstexpr

Definition at line 33 of file RuleTypes.hpp.

◆ MaxPlayerNameLength

constexpr std::size_t monopoly::rules::MaxPlayerNameLength = 39
inlineconstexpr

Definition at line 26 of file RuleTypes.hpp.

◆ MaxPlayers

constexpr PlayerNumber monopoly::rules::MaxPlayers = 6
inlineconstexpr

Definition at line 14 of file RuleTypes.hpp.

◆ MaxTokens

constexpr std::size_t monopoly::rules::MaxTokens = 11
inlineconstexpr

Definition at line 30 of file RuleTypes.hpp.

◆ NobodyPlayer

constexpr PlayerNumber monopoly::rules::NobodyPlayer = MaxPlayers + 1
inlineconstexpr

Definition at line 16 of file RuleTypes.hpp.

◆ SpectatorPlayer

constexpr PlayerNumber monopoly::rules::SpectatorPlayer
inlineconstexpr
Initial value:
=
static_cast<PlayerNumber>(MaxPlayers + 3)

Definition at line 22 of file RuleTypes.hpp.

◆ SquareCount

constexpr std::size_t monopoly::rules::SquareCount = 42
inlineconstexpr

Definition at line 24 of file RuleTypes.hpp.