bugfix: pass seedclass to function

This commit is contained in:
Maximilian Keßler 2024-10-12 13:53:14 +02:00
parent 11807628fa
commit ce8eea813c
2 changed files with 1 additions and 6 deletions

View file

@ -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): def generate_decks_for_variant(variant_id: int, num_players: int, num_seeds: int, seed_class: int = 1):
variant = Variant.from_db(variant_id) variant = Variant.from_db(variant_id)
for seed_num in range(num_seeds): 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( database.cur.execute(
"INSERT INTO seeds (seed, num_players, starting_player, variant_id, class, num) " "INSERT INTO seeds (seed, num_players, starting_player, variant_id, class, num) "
"VALUES (%s, %s, %s, %s, %s, %s)" "VALUES (%s, %s, %s, %s, %s, %s)"

View file

@ -210,11 +210,6 @@ def analyze(instance: hanab_game.HanabiInstance, only_find_first=False) -> List[
)) ))
pace_found = True 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 return reasons