Game of Ur 0.3.3
This is a computer adaptation of Game of Ur, written in C++ mainly using SDL and OpenGL.
|
Files | |
file | board.hpp |
Contains the data model class representing the 20-square board for Game of Ur. | |
file | dice.hpp |
Contains the data model class representing the pair of dice used to play Game of Ur. | |
file | house.hpp |
Contains classes and enums that define a house and describe its state. | |
file | model.hpp |
The class containing the interface to the data model for the whole game (Game of Ur). | |
file | phase.hpp |
Enums whose values represent the different phases a game can be in. | |
file | piece.hpp |
Contains definitions for pieces belonging to different sets used by competing players. | |
file | piece_type.hpp |
Contains structs and consts that describe the pieces in the game and their capabilities. | |
file | piece_type_id.hpp |
Contains enum listing the different types of pieces present in the game. | |
file | player.hpp |
Contains structs and classes representing a single player of the game and their current state. | |
file | role_id.hpp |
Contains an enum for the roles (sets of pieces) possible within this game. | |
file | serialize.hpp |
Contains methods to convert data from its-in game representation to its JSON representation, and vice versa. | |
Classes | |
class | Board |
The data model class representing the 20-square board for Game of Ur. More... | |
class | Dice |
The data model used to represent the pair of dice used to play Game of Ur. More... | |
class | House |
The representation of a single house on the Game of Ur Board, in other words a tile. More... | |
struct | HouseData |
Data returned by GameOfUrModel when queried about the state of a House. More... | |
struct | GamePieceData |
Data returned by GameOfUrModel when queried about the state of a single game piece. More... | |
struct | GamePhaseData |
Data returned by GameOfUrModel when queried about the current phase of the game. More... | |
struct | GameScoreData |
Data returned by GameOfUrModel when queried for scores. More... | |
struct | DiceData |
Data returned by GameOfUrModel when queried for dice related information. More... | |
struct | PlayerData |
Data returned by GameOfUrModel when queried about a player. More... | |
struct | MoveResultData |
Data returned by the GameOfUrModel when making a move, or querying possible moves. More... | |
class | GameOfUrModel |
The data model representing one instance of Game of Ur. More... | |
struct | PieceIdentity |
Data uniquely identifying a piece used in the game. More... | |
class | Piece |
The state of a single piece of the game. More... | |
struct | PieceType |
A struct containing information about a piece, including its name and information. More... | |
class | Player |
Data model for a single player of the game, tracking also the number of counters held by this player. More... | |
struct | GameRecord |
The details of a single completed game. More... | |
Enumerations | |
enum | PlayerID : uint8_t { PLAYER_A =0 , PLAYER_B } |
The two players playing the game, as known to GameOfUrModel. | |
enum class | GamePhase { INITIATIVE , PLAY , END } |
A value representing the high level phase of an entire game. | |
enum class | TurnPhase { ROLL_DICE , MOVE_PIECE , END } |
A value representing the phases possible in a single turn of the game. | |
enum class | RoundPhase { IN_PROGRESS , END } |
A value representing the phase of a single round, where in a round all players take a turn once. More... | |
enum | PieceTypeID : uint8_t { SWALLOW =0 , STORMBIRD , RAVEN , ROOSTER , EAGLE , TOTAL =5 } |
Enum listing the different types of pieces present in the game. | |
enum | RoleID { NA , BLACK , WHITE } |
A value representing the various roles (or sets, if preferred) possible in this game. | |
Functions | |
NLOHMANN_JSON_SERIALIZE_ENUM (PieceTypeID, { {PieceTypeID::EAGLE, "eagle"}, {PieceTypeID::ROOSTER, "rooster"}, {PieceTypeID::RAVEN, "raven"}, {PieceTypeID::STORMBIRD, "storm-bird"}, {PieceTypeID::SWALLOW, "swallow"}, }) | |
NLOHMANN_JSON_SERIALIZE_ENUM (RoleID, { {RoleID::BLACK, "black"}, {RoleID::WHITE, "white"}, }) | |
NLOHMANN_JSON_SERIALIZE_ENUM (PlayerID, { {PlayerID::PLAYER_A, "player-a"}, {PlayerID::PLAYER_B, "player-b"}, }) | |
void | from_json (const nlohmann::json &json, PieceIdentity &pieceIdentity) |
void | to_json (nlohmann::json &json, const PieceIdentity &pieceIdentity) |
void | from_json (const nlohmann::json &json, GameScoreData &gameScoreData) |
void | to_json (nlohmann::json &json, const GameScoreData &gameScoreData) |
void | from_json (const nlohmann::json &json, PlayerData &playerData) |
void | to_json (nlohmann::json &json, const PlayerData &playerData) |
Variables | |
const std::array< const PieceType, 5 > | kGamePieceTypes |
An array of PieceTypes, each element describing a single type of piece used in the game. | |
|
strong |
A value representing the phase of a single round, where in a round all players take a turn once.
In Game of Ur, a round ends every pair of turns.
|
inline |
An array of PieceTypes, each element describing a single type of piece used in the game.