105 std::array<std::shared_ptr<Piece>, 5>
mPieces {
nullptr };
The state of a single piece of the game.
Definition piece.hpp:52
State
A value representing the (high level) state of this piece.
Definition piece.hpp:58
Data model for a single player of the game, tracking also the number of counters held by this player.
Definition player.hpp:28
uint8_t mCounters
The number of counters currently held by this player.
Definition player.hpp:111
std::weak_ptr< Piece > getPiece(PieceTypeID pieceType)
Gets a reference to the data model of some piece owned by this player.
Definition player.cpp:15
const Piece & cGetPiece(PieceTypeID pieceType) const
Gets (a const reference to) a piece owned by this player corresponding to a requested type.
Definition player.cpp:20
uint8_t getNCounters() const
Gets the number of counters currently held by this player.
Definition player.hpp:65
RoleID mRole
The role (black or white) assigned to this player.
Definition player.hpp:97
uint8_t deductCounters(uint8_t counters)
Deducts some quantity of counters from this player's bank.
Definition player.cpp:7
std::array< std::shared_ptr< Piece >, 5 > mPieces
References to the data models of all the pieces owned by this player.
Definition player.hpp:105
uint8_t getNPieces(Piece::State inState) const
Returns the number of pieces owned by this player in a particular state.
Definition player.cpp:41
void depositCounters(uint8_t counters)
Deposits some quantity of counters to this player's bank.
Definition player.cpp:3
void initializeWithRole(RoleID role)
Assigns a role (black or white) to this player, and initializes the set of pieces corresponding to th...
Definition player.cpp:26
RoleID getRole() const
Gets the role (black or white or neither) currently assigned to this player for this game.
Definition player.hpp:72
PieceTypeID
Enum listing the different types of pieces present in the game.
Definition piece_type_id.hpp:22
RoleID
A value representing the various roles (or sets, if preferred) possible in this game.
Definition role_id.hpp:20
Contains definitions for pieces belonging to different sets used by competing players.
Contains an enum for the roles (sets of pieces) possible within this game.