diff options
| author | thecharlesblake | 2018-09-16 21:27:36 +0100 |
|---|---|---|
| committer | thecharlesblake | 2018-09-16 21:27:36 +0100 |
| commit | 48517141b32123f847dcb8d88e0dac999b9142ba (patch) | |
| tree | 3bbab181b9853e22ca37e938ece649d5d4f8e442 /src/main/input-output/input/json-parsing/rules_parser.cpp | |
| parent | Merge pull request #88 from thecharlesblake/fix-comma-bug (diff) | |
| download | metasol-48517141b32123f847dcb8d88e0dac999b9142ba.tar.gz metasol-48517141b32123f847dcb8d88e0dac999b9142ba.zip | |
Add parsing logic for sequence fixed suit rule
Diffstat (limited to 'src/main/input-output/input/json-parsing/rules_parser.cpp')
| -rw-r--r-- | src/main/input-output/input/json-parsing/rules_parser.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/input-output/input/json-parsing/rules_parser.cpp b/src/main/input-output/input/json-parsing/rules_parser.cpp index 209153f..a7c4fae 100644 --- a/src/main/input-output/input/json-parsing/rules_parser.cpp +++ b/src/main/input-output/input/json-parsing/rules_parser.cpp @@ -445,6 +445,14 @@ void rules_parser::modify_sol_rules(sol_rules& sr, Document& d) { } } + if (d["sequences"].HasMember("fixed suit")) { + if (d["sequences"]["fixed suit"].IsBool()) { + sr.sequence_fixed_suit = d["sequences"]["fixed suit"].GetBool(); + } else { + json_helper::json_parse_err("[fixed suit] must be a boolean"); + } + } + if (d["sequences"].HasMember("direction")) { if (d["sequences"]["direction"].IsString()) { string dir_str = d["sequences"]["direction"].GetString(); @@ -689,6 +697,9 @@ string rules_parser::rules_schema_json() { "LR" ] }, + "fixed suit": { + "type": "boolean" + }, "build policy": { "type": "string", "enum": [ |
