add assertion: check no double-initialization

This commit is contained in:
Maximilian Keßler 2023-11-12 23:50:48 +01:00
parent d3328725c7
commit 812a5dc790
Signed by: max
GPG key ID: BCC5A619923C0BA5

View file

@ -429,6 +429,7 @@ namespace Hanabi {
template<suit_t num_suits, player_t num_players, hand_index_t hand_size> template<suit_t num_suits, player_t num_players, hand_index_t hand_size>
void HanabiState<num_suits, num_players, hand_size>::init_backtracking_information() { void HanabiState<num_suits, num_players, hand_size>::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. // Note that this function does not have to be particularly performant, we only call it once to initialize.
const Card trash = [this]() -> Card { const Card trash = [this]() -> Card {
for (suit_t suit = 0; suit < num_suits; suit++) { for (suit_t suit = 0; suit < num_suits; suit++) {