From ce8eea813cd5521c66dcea2a8d1b2e1b9a69d23a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Sat, 12 Oct 2024 13:53:14 +0200 Subject: [PATCH] bugfix: pass seedclass to function --- src/hanabi/live/generate_seeds.py | 2 +- src/hanabi/solvers/deck_analyzer.py | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/hanabi/live/generate_seeds.py b/src/hanabi/live/generate_seeds.py index ec193ee..2e891b2 100644 --- a/src/hanabi/live/generate_seeds.py +++ b/src/hanabi/live/generate_seeds.py @@ -36,7 +36,7 @@ def generate_deck(variant: Variant, num_players: int, seed: int, seed_class: int def generate_decks_for_variant(variant_id: int, num_players: int, num_seeds: int, seed_class: int = 1): variant = Variant.from_db(variant_id) for seed_num in range(num_seeds): - seed, deck = generate_deck(variant, num_players, seed_num) + seed, deck = generate_deck(variant, num_players, seed_num, seed_class) database.cur.execute( "INSERT INTO seeds (seed, num_players, starting_player, variant_id, class, num) " "VALUES (%s, %s, %s, %s, %s, %s)" diff --git a/src/hanabi/solvers/deck_analyzer.py b/src/hanabi/solvers/deck_analyzer.py index a477c8b..c2adf24 100644 --- a/src/hanabi/solvers/deck_analyzer.py +++ b/src/hanabi/solvers/deck_analyzer.py @@ -210,11 +210,6 @@ def analyze(instance: hanab_game.HanabiInstance, only_find_first=False) -> List[ )) pace_found = True - # check that we correctly walked through the deck - assert (len(stored_cards) == 0) - assert (len(stored_crits) == 0) - assert (sum(stacks) == instance.max_score) - return reasons