From 90f27bb26dfd9d1b088b2498862463de845df124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sun, 17 Mar 2024 11:16:04 +0100 Subject: [PATCH] Fix bug when reverting to turn 1 in recursive mode --- src/game_interface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game_interface.cpp b/src/game_interface.cpp index b2120f2..46be362 100644 --- a/src/game_interface.cpp +++ b/src/game_interface.cpp @@ -119,8 +119,8 @@ namespace Hanabi { make_turn(); } - while (state->draw_pile_size() < draw_pile_break or - (state->draw_pile_size() == draw_pile_break and state->last_action_type() == ActionType::clue)) + while (next_action > 0 and (state->draw_pile_size() < draw_pile_break or + (state->draw_pile_size() == draw_pile_break and state->last_action_type() == ActionType::clue))) { revert_turn(); }