Serializer.

This commit is contained in:
Pcornat 2022-01-14 23:09:20 +01:00
parent 3691042b6e
commit 4f1075dc28
Signed by: Pcornat
GPG Key ID: 2F3932FF46D9ECA0
1 changed files with 13 additions and 0 deletions

View File

@ -56,6 +56,19 @@ namespace character {
[[nodiscard]] std::uint32_t get_money() const { return money; }
};
void to_json(json &j, const CharacterSheet &billy) {
j["caractere"] = billy.get_caractere();
j["adresse"] = billy.get_adresse();
j["endurance"] = billy.get_endurance();
j["chance"] = billy.get_chance();
j["habilete"] = billy.get_habilete();
j["health_point"] = billy.get_health_point();
j["armor"] = billy.get_armor();
j["damage"] = billy.get_damage();
j["glory"] = billy.get_glory();
j["money"] = billy.get_money();
}
}