From 9ea820ab371c7e1c033ab912317ba6096db87caa Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Fri, 12 Jan 2018 16:31:38 +0000 Subject: Add unit tests for global cache --- src/main/game/sol_rules.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/main/game/sol_rules.cpp (limited to 'src/main/game/sol_rules.cpp') diff --git a/src/main/game/sol_rules.cpp b/src/main/game/sol_rules.cpp new file mode 100644 index 0000000..6c16b4a --- /dev/null +++ b/src/main/game/sol_rules.cpp @@ -0,0 +1,29 @@ +// +// Created by thecharlesblake on 1/12/18. +// + +#include "sol_rules.h" + +typedef sol_rules::build_policy pol; +typedef sol_rules::spaces_policy s_pol; +typedef sol_rules::stock_deal_type sdt; + +// Note that the 'default' sol rules are set up by parsing the default json +// rules description. This initialisation is really just for testing purposes. +sol_rules::sol_rules() : + tableau_pile_count(0), + build_pol(pol::ANY_SUIT), + spaces_pol(s_pol::ANY), + move_built_group(false), + two_decks(false), + max_rank(13), + hole(false), + foundations(true), + foundations_init_card(false), + diagonal_deal(false), + cells(0), + stock_size(0), + stock_deal_t(sdt::WASTE), + reserve_size(0), + reserve_stacked(false) { +} -- cgit v1.2.1 From 413008eafb6cab3f2e24ca23e7e5c052dd04ddd9 Mon Sep 17 00:00:00 2001 From: thecharlesblake Date: Thu, 18 Jan 2018 13:57:53 +0000 Subject: Fix sol_rules setup issues --- src/main/game/sol_rules.cpp | 4 ++-- 1 file changed, 2 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 6c16b4a..7311e06 100644 --- a/src/main/game/sol_rules.cpp +++ b/src/main/game/sol_rules.cpp @@ -18,12 +18,12 @@ sol_rules::sol_rules() : two_decks(false), max_rank(13), hole(false), - foundations(true), + foundations(false), foundations_init_card(false), diagonal_deal(false), cells(0), stock_size(0), - stock_deal_t(sdt::WASTE), + stock_deal_t(sdt::TABLEAU_PILES), reserve_size(0), reserve_stacked(false) { } -- cgit v1.2.1