aboutsummaryrefslogtreecommitdiff
path: root/src/main/game/search-state/game_state.cpp
diff options
context:
space:
mode:
authorCharlie Blake2018-07-11 11:56:37 +0100
committerCharlie Blake2018-07-11 11:56:37 +0100
commit5f67ae3c634cdeebda84189f41734c9f4a4657b3 (patch)
tree251d0edc1ab11a42c2da47d6f0c3754414531b6c /src/main/game/search-state/game_state.cpp
parentAdd logic to take cards from within piles (diff)
downloadmetasol-5f67ae3c634cdeebda84189f41734c9f4a4657b3.tar.gz
metasol-5f67ae3c634cdeebda84189f41734c9f4a4657b3.zip

Parse sequence from deal

Diffstat (limited to 'src/main/game/search-state/game_state.cpp')
-rw-r--r--src/main/game/search-state/game_state.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/game/search-state/game_state.cpp b/src/main/game/search-state/game_state.cpp
index 0720f6e..1af554c 100644
--- a/src/main/game/search-state/game_state.cpp
+++ b/src/main/game/search-state/game_state.cpp
@@ -104,6 +104,12 @@ game_state::game_state(const sol_rules& s_rules, streamliner_options stream_opts
tableau_piles.push_back(static_cast<pile::ref>(piles.size() - 1));
original_tableau_piles.push_back(static_cast<pile::ref>(piles.size() - 1));
}
+
+ // Creates the sequence piles
+ for (uint8_t i = 0; i < rules.sequence_count; i++) {
+ piles.emplace_back();
+ sequences.push_back(static_cast<pile::ref>(piles.size() - 1));
+ }
}
// Constructs an initial game state from a JSON doc