From 78a703434d9bcd326c9f80f668599f0b5ac7332d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sat, 12 Aug 2023 20:10:28 +0200 Subject: [PATCH] adjust getter method for games to start turn counting at 1 --- src/download.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/download.cpp b/src/download.cpp index 8ffe0a8..c9a1a5f 100644 --- a/src/download.cpp +++ b/src/download.cpp @@ -98,12 +98,12 @@ namespace Download { std::unique_ptr produce_state( const std::vector& deck, const std::vector& actions, - size_t num_turns_to_replicate, + size_t start_turn, size_t draw_pile_break = 0 ) { auto game = std::unique_ptr(new Hanabi::HanabiState(deck)); std::uint8_t index; - for (size_t i = 0; i < std::min(num_turns_to_replicate, actions.size()); i++) { + for (size_t i = 0; i < std::min(start_turn - 1, actions.size()); i++) { if (game->draw_pile_size() == draw_pile_break) { break; }