diff --git a/include/game_state.hpp b/include/game_state.hpp index 9b3c6b6..92afe22 100644 --- a/include/game_state.hpp +++ b/include/game_state.hpp @@ -537,6 +537,12 @@ namespace Hanabi template void HanabiState::init_backtracking_information() { + if (_weighted_draw_pile_size > 20) + { + std::stringstream ss; + ss << "Detected draw pile size of " << +_weighted_draw_pile_size << " is too big, can at most be 20."; + throw std::runtime_error(ss.str()); + } ASSERT(not _relative_representation.initialized); // Note that this function does not have to be particularly performant, we only call it once to initialize. const Card trash = [this]() -> Card {