diff options
| author | Charlie Blake | 2018-07-19 11:06:38 +0100 |
|---|---|---|
| committer | Charlie Blake | 2018-07-19 11:06:38 +0100 |
| commit | 28c5a79425fa12f9466e27385404f429f76f7524 (patch) | |
| tree | 40301029469de5e8e114cc8527c4ca98069c2df2 /src/main/game/search-state | |
| parent | Canfield rules schema and update default rules (diff) | |
| download | metasol-28c5a79425fa12f9466e27385404f429f76f7524.tar.gz metasol-28c5a79425fa12f9466e27385404f429f76f7524.zip | |
Update rules so new schema works w/ existing games
Diffstat (limited to 'src/main/game/search-state')
| -rw-r--r-- | src/main/game/search-state/game_state.cpp | 3 | ||||
| -rw-r--r-- | src/main/game/search-state/game_state.legal_moves.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/main/game/search-state/game_state.cpp b/src/main/game/search-state/game_state.cpp index 0388d9c..10c8e20 100644 --- a/src/main/game/search-state/game_state.cpp +++ b/src/main/game/search-state/game_state.cpp @@ -38,6 +38,7 @@ typedef sol_rules::build_policy pol; typedef sol_rules::stock_deal_type sdt; typedef sol_rules::face_up_policy fu; typedef game_state::streamliner_options sos; +typedef sol_rules::foundations_init_type fit; ////////////////// // CONSTRUCTORS // @@ -139,7 +140,7 @@ game_state::game_state(const sol_rules& s_rules, int seed, streamliner_options s } // If the foundations begin filled, then fills them - if (rules.foundations_init_card) { + if (rules.foundations_init_cards == fit::ALL) { for (uint8_t f_idx = 0; f_idx < 4*(rules.two_decks ? 2:1); f_idx++) { card c = card(f_idx % uint8_t(4), 1); diff --git a/src/main/game/search-state/game_state.legal_moves.cpp b/src/main/game/search-state/game_state.legal_moves.cpp index e1cbc8e..99a37d6 100644 --- a/src/main/game/search-state/game_state.legal_moves.cpp +++ b/src/main/game/search-state/game_state.legal_moves.cpp @@ -22,6 +22,7 @@ typedef sol_rules::accordion_policy acc_pol; typedef sol_rules::stock_deal_type sdt; typedef sol_rules::face_up_policy fu; typedef sol_rules::direction dir; +typedef sol_rules::built_group_type bgt; //////////////////////////////// // MAIN LEGAL MOVE GEN CYCLE /// @@ -97,7 +98,7 @@ vector<move> game_state::get_legal_moves(move parent_move) { if (rules.stock_size > 0 && rules.stock_deal_t == sdt::WASTE && !piles[stock].empty()) add_stock_to_tableau_moves(moves); - if (rules.move_built_group) + if (rules.move_built_group != bgt::NO) add_built_group_moves(moves); // Tableau to tableau moves |
