diff --git a/include/game_state.hpp b/include/game_state.hpp index f0ae6ee..f5b0546 100644 --- a/include/game_state.hpp +++ b/include/game_state.hpp @@ -91,7 +91,7 @@ namespace Hanabi template void HanabiState::give_clue() { - ASSERT(_num_clues > 0); + ASSERT(_num_clues >= clue_t(1)); --_num_clues; _actions_log.emplace(ActionType::clue, Cards::unknown, 0); @@ -591,9 +591,10 @@ namespace Hanabi ASSERT(last_action.action_type == ActionType::discard); decr_turn(); - ASSERT(_num_clues > 0); _num_clues -= _clues_gained_on_discard_or_stack_finished; + ASSERT(_num_clues >= clue_t(0)); + _pace++; revert_draw(last_action.index, last_action.discarded, cycle, false); @@ -806,7 +807,7 @@ namespace Hanabi } } - if (_num_clues > 0) + if (_num_clues >= clue_t(1)) { give_clue(); const std::optional prob = lookup(); @@ -945,7 +946,7 @@ namespace Hanabi } // Last option is to stall - if (_num_clues > 0) + if (_num_clues >= clue_t(1)) { give_clue(); const probability_t probability_stall = evaluate_state();