Game of Ur 0.3.3
This is a computer adaptation of Game of Ur, written in C++ mainly using SDL and OpenGL.
Loading...
Searching...
No Matches
serialize.hpp File Reference

Contains methods to convert data from its-in game representation to its JSON representation, and vice versa. More...

#include <nlohmann/json.hpp>
#include "model.hpp"

Go to the source code of this file.

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)
 

Detailed Description

Contains methods to convert data from its-in game representation to its JSON representation, and vice versa.

Author
Zoheb Shujauddin (zoheb.nosp@m.2424.nosp@m.@gmai.nosp@m.l.co.nosp@m.m)
Version
0.3.2
Date
2025-09-12