diff options
| author | thecharlesblake | 2018-10-14 13:08:51 +0100 |
|---|---|---|
| committer | thecharlesblake | 2018-10-14 13:08:51 +0100 |
| commit | f92c4ef763bbd3e0d8dc1145121e3af5d3ea16cf (patch) | |
| tree | e2a941215006fecf4bd0379e3b6dbf7494ed0720 /src/main/game/search-state/game_state.cpp | |
| parent | Merge pull request #98 from thecharlesblake/deal-print (diff) | |
| download | metasol-f92c4ef763bbd3e0d8dc1145121e3af5d3ea16cf.tar.gz metasol-f92c4ef763bbd3e0d8dc1145121e3af5d3ea16cf.zip | |
Add pre-filled cells
Diffstat (limited to 'src/main/game/search-state/game_state.cpp')
| -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++) { |
