From 5f67ae3c634cdeebda84189f41734c9f4a4657b3 Mon Sep 17 00:00:00 2001 From: Charlie Blake Date: Wed, 11 Jul 2018 11:56:37 +0100 Subject: Parse sequence from deal --- src/main/game/search-state/game_state.cpp | 6 ++++++ src/main/game/search-state/game_state.h | 1 + 2 files changed, 7 insertions(+) (limited to 'src/main/game') 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(piles.size() - 1)); original_tableau_piles.push_back(static_cast(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(piles.size() - 1)); + } } // Constructs an initial game state from a JSON doc diff --git a/src/main/game/search-state/game_state.h b/src/main/game/search-state/game_state.h index 3f354d1..15d237a 100644 --- a/src/main/game/search-state/game_state.h +++ b/src/main/game/search-state/game_state.h @@ -136,6 +136,7 @@ private: pile::ref waste; std::list reserve; std::vector foundations; + std::vector sequences; pile::ref hole; /* Pile references of starting/original layout */ -- cgit v1.2.1