From 48517141b32123f847dcb8d88e0dac999b9142ba Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Sun, 16 Sep 2018 21:27:36 +0100 Subject: Add parsing logic for sequence fixed suit rule --- src/main/input-output/input/json-parsing/rules_parser.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/main/input-output/input/json-parsing') 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": [ -- cgit v1.2.1