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

Classes

struct  SquareDefinition
 

Typedefs

using PropertySet = std::uint32_t
 

Enumerations

enum class  SquareType : std::uint8_t {
  Go = 0 , MediterraneanAvenue , CommunityChest1 , BalticAvenue ,
  IncomeTax , ReadingRailroad , OrientalAvenue , Chance1 ,
  VermontAvenue , ConnecticutAvenue , JustVisiting , StCharlesPlace ,
  ElectricCompany , StatesAvenue , VirginiaAvenue , PennsylvaniaRailroad ,
  StJamesPlace , CommunityChest2 , TennesseeAvenue , NewYorkAvenue ,
  FreeParking , KentuckyAvenue , Chance2 , IndianaAvenue ,
  IllinoisAvenue , BAndORailroad , AtlanticAvenue , VentnorAvenue ,
  WaterWorks , MarvinGardens , GoToJail , PacificAvenue ,
  NorthCarolinaAvenue , CommunityChest3 , PennsylvaniaAvenue , ShortLineRailroad ,
  Chance3 , ParkPlace , LuxuryTax , Boardwalk ,
  InJail , OffBoard , Count
}
 
enum class  SquareGroup : std::uint8_t {
  MediterraneanAvenue = 0 , OrientalAvenue , StCharlesPlace , StJamesPlace ,
  KentuckyAvenue , AtlanticAvenue , PacificAvenue , ParkPlace ,
  Railroad , Utility , CommunityChest , Chance ,
  Miscellaneous , Count
}
 

Functions

bool initializeForOptions (const GameOptions &options)
 
const std::array< SquareDefinition, 42 > & definitions ()
 
const SquareDefinition & definition (SquareType square)
 
const SquareDefinition & originalDefinition (SquareType square)
 
PropertySet propertyBit (SquareType square)
 
bool isOwnable (SquareType square)
 

Variables

constexpr std::size_t MaxPropertyGroups = 10
 
constexpr std::size_t RentStepCount = 6
 

Typedef Documentation

◆ PropertySet

Definition at line 88 of file BoardRules.hpp.

Enumeration Type Documentation

◆ SquareGroup

enum class monopoly::rules::board::SquareGroup : std::uint8_t
strong
Enumerator
MediterraneanAvenue 
OrientalAvenue 
StCharlesPlace 
StJamesPlace 
KentuckyAvenue 
AtlanticAvenue 
PacificAvenue 
ParkPlace 
Railroad 
Utility 
CommunityChest 
Chance 
Miscellaneous 
Count 

Definition at line 64 of file BoardRules.hpp.

◆ SquareType

enum class monopoly::rules::board::SquareType : std::uint8_t
strong
Enumerator
Go 
MediterraneanAvenue 
CommunityChest1 
BalticAvenue 
IncomeTax 
ReadingRailroad 
OrientalAvenue 
Chance1 
VermontAvenue 
ConnecticutAvenue 
JustVisiting 
StCharlesPlace 
ElectricCompany 
StatesAvenue 
VirginiaAvenue 
PennsylvaniaRailroad 
StJamesPlace 
CommunityChest2 
TennesseeAvenue 
NewYorkAvenue 
FreeParking 
KentuckyAvenue 
Chance2 
IndianaAvenue 
IllinoisAvenue 
BAndORailroad 
AtlanticAvenue 
VentnorAvenue 
WaterWorks 
MarvinGardens 
GoToJail 
PacificAvenue 
NorthCarolinaAvenue 
CommunityChest3 
PennsylvaniaAvenue 
ShortLineRailroad 
Chance3 
ParkPlace 
LuxuryTax 
Boardwalk 
InJail 
OffBoard 
Count 

Definition at line 11 of file BoardRules.hpp.

Function Documentation

◆ definition()

const SquareDefinition & monopoly::rules::board::definition ( SquareType  square)

Definition at line 181 of file BoardRules.cpp.

◆ definitions()

const std::array< SquareDefinition, 42 > & monopoly::rules::board::definitions ( )

Definition at line 174 of file BoardRules.cpp.

◆ initializeForOptions()

bool monopoly::rules::board::initializeForOptions ( const GameOptions &  options)

Definition at line 139 of file BoardRules.cpp.

◆ isOwnable()

bool monopoly::rules::board::isOwnable ( SquareType  square)

Definition at line 204 of file BoardRules.cpp.

◆ originalDefinition()

const SquareDefinition & monopoly::rules::board::originalDefinition ( SquareType  square)

Definition at line 189 of file BoardRules.cpp.

◆ propertyBit()

PropertySet monopoly::rules::board::propertyBit ( SquareType  square)

Definition at line 195 of file BoardRules.cpp.

Variable Documentation

◆ MaxPropertyGroups

constexpr std::size_t monopoly::rules::board::MaxPropertyGroups = 10
inlineconstexpr

Definition at line 85 of file BoardRules.hpp.

◆ RentStepCount

constexpr std::size_t monopoly::rules::board::RentStepCount = 6
inlineconstexpr

Definition at line 86 of file BoardRules.hpp.