From 812a5dc7903adf8ac9260192f59cca5fd05615cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sun, 12 Nov 2023 23:50:48 +0100 Subject: [PATCH] add assertion: check no double-initialization --- include/game_state.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/game_state.hpp b/include/game_state.hpp index 7bb0514..8ecbaf7 100644 --- a/include/game_state.hpp +++ b/include/game_state.hpp @@ -429,6 +429,7 @@ namespace Hanabi { template void HanabiState::init_backtracking_information() { + 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 { for (suit_t suit = 0; suit < num_suits; suit++) {