From e4cc1d4f6166f6dcddc38c944f80053cd2d9ee88 Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Sun, 16 Sep 2018 22:09:51 +0100 Subject: Add parsing logic for auto-waste-then-stock spaces --- src/main/input-output/input/json-parsing/rules_parser.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main/input-output') 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 a7c4fae..2698e68 100644 --- a/src/main/input-output/input/json-parsing/rules_parser.cpp +++ b/src/main/input-output/input/json-parsing/rules_parser.cpp @@ -121,6 +121,8 @@ void rules_parser::modify_sol_rules(sol_rules& sr, Document& d) { sr.spaces_pol = s_pol::KINGS; } else if (sp_str == "auto-reserve-then-waste") { sr.spaces_pol = s_pol::AUTO_RESERVE_THEN_WASTE; + } else if (sp_str == "auto-waste-then-stock") { + sr.spaces_pol = s_pol::AUTO_WASTE_THEN_STOCK; } else { json_helper::json_parse_err("[tableau piles][spaces policy] is invalid"); } @@ -543,7 +545,8 @@ string rules_parser::rules_schema_json() { "any", "no-build", "kings", - "auto-reserve-then-waste" + "auto-reserve-then-waste", + "auto-waste-then-stock" ] }, "diagonal deal": { -- cgit v1.2.1 From fc981dd44fa25e5ea7fb22f4020d3f67fe0c861a Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Sun, 16 Sep 2018 23:03:07 +0100 Subject: Add logic for auto-waste-then-stock --- src/main/input-output/input/sol_preset_types.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/input-output') diff --git a/src/main/input-output/input/sol_preset_types.cpp b/src/main/input-output/input/sol_preset_types.cpp index 9ddf933..1f2df69 100644 --- a/src/main/input-output/input/sol_preset_types.cpp +++ b/src/main/input-output/input/sol_preset_types.cpp @@ -200,7 +200,8 @@ map sol_preset_types::mp = { { "tableau piles": { "count": 12, - "build policy": "same-suit" + "build policy": "same-suit", + "spaces policy": "auto-waste-then-stock" }, "foundations": { "initial cards": "all" -- cgit v1.2.1