diff options
| author | Charlie Blake | 2018-10-14 15:06:44 +0100 |
|---|---|---|
| committer | GitHub | 2018-10-14 15:06:44 +0100 |
| commit | 247fba9d4cefc511aebec4d494ce7659ac31beb5 (patch) | |
| tree | e2a941215006fecf4bd0379e3b6dbf7494ed0720 /src/main/game/search-state | |
| parent | Merge pull request #98 from thecharlesblake/deal-print (diff) | |
| parent | Add pre-filled cells (diff) | |
| download | metasol-247fba9d4cefc511aebec4d494ce7659ac31beb5.tar.gz metasol-247fba9d4cefc511aebec4d494ce7659ac31beb5.zip | |
Merge pull request #99 from thecharlesblake/pre-filled-cells
Add pre-filled cells
Diffstat (limited to 'src/main/game/search-state')
| -rw-r--r-- | src/main/game/search-state/game_state.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/game/search-state/game_state.cpp b/src/main/game/search-state/game_state.cpp index 36f92d7..6cd1262 100644 --- a/src/main/game/search-state/game_state.cpp +++ b/src/main/game/search-state/game_state.cpp @@ -166,6 +166,15 @@ game_state::game_state(const sol_rules& s_rules, int seed, streamliner_options s place_card(foundations[(f_idx + rand_suit)], c); } + // If there are pre-filled cells, deals to them + auto it = begin(original_cells); + for (uint8_t i = 0; i < rules.cells_pre_filled; i++) { + pile::ref r = *it; + place_card(r, deck.back()); + deck.pop_back(); + it++; + } + // If there is a stock, deals to it and set up a waste pile too if (rules.stock_size > 0) { for (unsigned int i = 0; i < rules.stock_size; i++) { |
