diff options
| author | thecharlesblake | 2017-11-14 01:53:12 +0000 |
|---|---|---|
| committer | thecharlesblake | 2017-11-14 01:53:12 +0000 |
| commit | 67f38c0d10e8d864cb812429f1e09e12bd3dc3fa (patch) | |
| tree | e2d76d46bb435d01760bb01db9e4123f33063a2d /src/main/game/sol_rules.h | |
| parent | Add new valid presets logic to cmd helper (diff) | |
| download | metasol-67f38c0d10e8d864cb812429f1e09e12bd3dc3fa.tar.gz metasol-67f38c0d10e8d864cb812429f1e09e12bd3dc3fa.zip | |
Add logic for reading preset sols and file json
Diffstat (limited to 'src/main/game/sol_rules.h')
| -rw-r--r-- | src/main/game/sol_rules.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/main/game/sol_rules.h b/src/main/game/sol_rules.h index b73097d..17dd74a 100644 --- a/src/main/game/sol_rules.h +++ b/src/main/game/sol_rules.h @@ -8,6 +8,9 @@ #include <vector> #include <string> +#include <boost/optional.hpp> +#include <rapidjson/document.h> + class sol_rules { public: enum class valid_sol { @@ -37,12 +40,12 @@ public: RED_BLACK }; - static std::vector<std::string> valid_sol_strs; + static const sol_rules from_preset(const std::string); + static const sol_rules from_file(const std::string); + static bool is_suit(build_policy); static int suit_val(build_policy); - explicit sol_rules(std::string); - unsigned int tableau_pile_count; build_order build_ord; build_policy build_pol; @@ -54,6 +57,10 @@ public: unsigned int stock_size; private: + static sol_rules get_default(); + static void modify_sol_rules(sol_rules&, rapidjson::Document&); + static void parse_err(const std::string&); + static valid_sol valid_sol_enum(const std::string&); }; |
