diff options
| author | Charlie Blake | 2017-11-11 11:27:28 +0000 |
|---|---|---|
| committer | GitHub | 2017-11-11 11:27:28 +0000 |
| commit | 832b319d482a1fb29e5a673b16ea11ab5edb8d68 (patch) | |
| tree | f29c4843e60bd06c3d04f7abb398c08da22136c7 /src/main/sol_rules.cpp | |
| parent | Merge pull request #18 from thecharlesblake/docs (diff) | |
| parent | Add game state printing and fix bugs (diff) | |
| download | metasol-832b319d482a1fb29e5a673b16ea11ab5edb8d68.tar.gz metasol-832b319d482a1fb29e5a673b16ea11ab5edb8d68.zip | |
Merge pull request #19 from thecharlesblake/canfield
Canfield
Diffstat (limited to 'src/main/sol_rules.cpp')
| -rw-r--r-- | src/main/sol_rules.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/main/sol_rules.cpp b/src/main/sol_rules.cpp index b98e96d..f47cf44 100644 --- a/src/main/sol_rules.cpp +++ b/src/main/sol_rules.cpp @@ -21,7 +21,9 @@ vector<string> sol_rules::valid_sol_strs = { "spanish-patience", "simple-spanish-patience", "free-cell", - "simple-free-cell" + "simple-free-cell", + "canfield", + "simple-canfield" }; bool sol_rules::is_suit(pol bp) { @@ -44,10 +46,13 @@ sol_rules::sol_rules(std::string sol_type) { // Default game values build_ord = build_order::DESCENDING; + build_pol = build_policy::ANY_SUIT; max_rank = 13; hole = false; foundations = true; cells = 0; + reserve_size = 0; + stock_size = 0; // Game-specific values switch(vs) { @@ -81,6 +86,19 @@ sol_rules::sol_rules(std::string sol_type) { max_rank = 3; cells = 1; break; + case valid_sol::CANFIELD: + tableau_pile_count = 4; + build_pol = build_policy::RED_BLACK; + reserve_size = 14; + stock_size = 34; + break; + case valid_sol::SIMPLE_CANFIELD: + tableau_pile_count = 3; + build_pol = build_policy::RED_BLACK; + max_rank = 3; + reserve_size = 3; + stock_size = 6; + break; default: assert(false); } |
