From 23b250bf83739772ff54d9ba505f1fafa2be193b Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Sat, 13 Oct 2018 22:32:19 +0100 Subject: Add json printing of initial deal --- src/main/input-output/input/json-parsing/json_helper.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/main/input-output/input/json-parsing/json_helper.h') diff --git a/src/main/input-output/input/json-parsing/json_helper.h b/src/main/input-output/input/json-parsing/json_helper.h index b5e2d51..460911f 100644 --- a/src/main/input-output/input/json-parsing/json_helper.h +++ b/src/main/input-output/input/json-parsing/json_helper.h @@ -7,7 +7,11 @@ #include +#include +#include + #include "../../../../../lib/rapidjson/schema.h" +#include "../../../game/search-state/game_state.h" class json_helper { public: @@ -15,6 +19,12 @@ public: static void json_parse_warning(const std::string& msg); static void json_parse_err(const std::string& msg); static const std::string schema_err_str(const rapidjson::SchemaValidator&); + static void print_game_state_as_json(const game_state&); +private: + static boost::property_tree::ptree piles_to_ptree(const game_state&, const std::list&); + static boost::property_tree::ptree piles_to_ptree(const game_state&, const std::vector&); + static boost::property_tree::ptree pile_to_ptree(const pile&); + static boost::property_tree::ptree card_to_ptree(const card&); }; -- cgit v1.2.1