This commit is contained in:
2026-03-19 16:16:51 +01:00
parent 2d7fd0356b
commit cea827815e
2 changed files with 1 additions and 30 deletions

View File

@@ -566,32 +566,3 @@ def compute_deck_type(cards: list) -> str | None:
if avg_atk > avg_def * 1.5: if avg_atk > avg_def * 1.5:
return "Aggro" return "Aggro"
return "Balanced" return "Balanced"
# for card in generate_cards(5):
# print(card)
# cards = []
# for i in range(20):
# print(i)
# cards += generate_cards(10)
# sleep(3)
# costs = []
# from collections import Counter
# for card in cards:
# costs.append((card.card_rarity,card.cost))
# if card.card_rarity == CardRarity.legendary:
# print(card)
# print(Counter(costs))
# for card in generate_cards(100):
# if card.card_type == CardType.other:
# print(card)
# print(generate_card("9/11"))
# print(generate_card("Julius Caesar"))
# print(generate_card("List of lists of lists"))
# print(generate_card("Boudica"))
# print(generate_card("Harald Bluetooth"))
# print(generate_card("Nørrebro"))

View File

@@ -68,7 +68,7 @@ class PlayerState:
"""True if the player has any playable cards left in deck or hand or on board.""" """True if the player has any playable cards left in deck or hand or on board."""
board_empty = all([c is None for c in self.board]) board_empty = all([c is None for c in self.board])
non_played_cards = self.deck + self.hand non_played_cards = self.deck + self.hand
return (not board_empty) or any(c.cost <= MAX_ENERGY_CAP for c in non_played_cards) return (not board_empty) or any(c.cost <= max(MAX_ENERGY_CAP,self.energy) for c in non_played_cards)
@dataclass @dataclass
class CombatEvent: class CombatEvent: