12#ifndef ZOAPPSERIALIZE_H
13#define ZOAPPSERIALIZE_H
15#include <nlohmann/json.hpp>
21 {PieceTypeID::EAGLE,
"eagle"},
22 {PieceTypeID::ROOSTER,
"rooster"},
23 {PieceTypeID::RAVEN,
"raven"},
24 {PieceTypeID::STORMBIRD,
"storm-bird"},
25 {PieceTypeID::SWALLOW,
"swallow"},
29NLOHMANN_JSON_SERIALIZE_ENUM(
RoleID, {
30 {RoleID::BLACK,
"black"},
31 {RoleID::WHITE,
"white"},
35NLOHMANN_JSON_SERIALIZE_ENUM(
PlayerID, {
36 {PlayerID::PLAYER_A,
"player-a"},
37 {PlayerID::PLAYER_B,
"player-b"},
41void from_json(
const nlohmann::json& json,
PieceIdentity& pieceIdentity);
43void to_json(nlohmann::json& json,
const PieceIdentity& pieceIdentity);
46void from_json(
const nlohmann::json& json,
GameScoreData& gameScoreData);
48void to_json(nlohmann::json& json,
const GameScoreData& gameScoreData);
51void from_json(
const nlohmann::json& json,
PlayerData& playerData);
53void to_json(nlohmann::json& json,
const PlayerData& playerData);
The class containing the interface to the data model for the whole game (Game of Ur).
PieceTypeID
Enum listing the different types of pieces present in the game.
Definition piece_type_id.hpp:22
PlayerID
The two players playing the game, as known to GameOfUrModel.
Definition model.hpp:40
RoleID
A value representing the various roles (or sets, if preferred) possible in this game.
Definition role_id.hpp:20
Data returned by GameOfUrModel when queried for scores.
Definition model.hpp:151
Data uniquely identifying a piece used in the game.
Definition piece.hpp:29
Data returned by GameOfUrModel when queried about a player.
Definition model.hpp:229