Fix bug when reverting to turn 1 in recursive mode

This commit is contained in:
Maximilian Keßler 2024-03-17 11:16:04 +01:00
parent b966475045
commit 90f27bb26d
Signed by: max
GPG Key ID: BCC5A619923C0BA5

View File

@ -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();
}