From 28c5a79425fa12f9466e27385404f429f76f7524 Mon Sep 17 00:00:00 2001 From: Charlie Blake Date: Thu, 19 Jul 2018 11:06:38 +0100 Subject: Update rules so new schema works w/ existing games --- src/main/game/sol_rules.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/main/game/sol_rules.cpp') diff --git a/src/main/game/sol_rules.cpp b/src/main/game/sol_rules.cpp index 0ea998e..d19d0b8 100644 --- a/src/main/game/sol_rules.cpp +++ b/src/main/game/sol_rules.cpp @@ -9,6 +9,8 @@ typedef sol_rules::spaces_policy s_pol; typedef sol_rules::stock_deal_type sdt; typedef sol_rules::direction dir; typedef sol_rules::face_up_policy fu; +typedef sol_rules::built_group_type bgt; +typedef sol_rules::foundations_init_type fit; // Note that the 'default' sol rules are set up by parsing the default json // rules description. This initialisation is really just for testing purposes. @@ -16,13 +18,13 @@ sol_rules::sol_rules() : tableau_pile_count(0), build_pol(pol::ANY_SUIT), spaces_pol(s_pol::ANY), - move_built_group(false), + move_built_group(bgt::NO), built_group_pol(pol::ANY_SUIT), two_decks(false), max_rank(13), hole(false), foundations_present(false), - foundations_init_card(false), + foundations_init_cards(fit::NONE), foundations_only_comp_piles(false), diagonal_deal(false), cells(0), -- cgit v1.2.1 From 2775a9ba0ef4e698acd0c0d32179d6a1e404297a Mon Sep 17 00:00:00 2001 From: Charlie Blake Date: Thu, 19 Jul 2018 16:16:39 +0100 Subject: Add parsing of new rules --- src/main/game/sol_rules.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main/game/sol_rules.cpp') diff --git a/src/main/game/sol_rules.cpp b/src/main/game/sol_rules.cpp index d19d0b8..55c6757 100644 --- a/src/main/game/sol_rules.cpp +++ b/src/main/game/sol_rules.cpp @@ -25,6 +25,7 @@ sol_rules::sol_rules() : hole(false), foundations_present(false), foundations_init_cards(fit::NONE), + foundations_base(1), foundations_only_comp_piles(false), diagonal_deal(false), cells(0), -- cgit v1.2.1 From 390a3cb4f15d84cde2312411b16203b70dbb2df5 Mon Sep 17 00:00:00 2001 From: Charlie Blake Date: Mon, 23 Jul 2018 10:31:37 +0100 Subject: Add foundation wrap logic and fix top-of-waste bug --- src/main/game/sol_rules.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main/game/sol_rules.cpp') diff --git a/src/main/game/sol_rules.cpp b/src/main/game/sol_rules.cpp index 55c6757..2778241 100644 --- a/src/main/game/sol_rules.cpp +++ b/src/main/game/sol_rules.cpp @@ -20,6 +20,7 @@ sol_rules::sol_rules() : spaces_pol(s_pol::ANY), move_built_group(bgt::NO), built_group_pol(pol::ANY_SUIT), + tableau_wraps(false), two_decks(false), max_rank(13), hole(false), -- cgit v1.2.1