From c856e89eab936a6e0e9f82da3ea4d675d63a43ca Mon Sep 17 00:00:00 2001 From: Kimi Heinonen Date: Wed, 8 Mar 2023 22:31:50 +0200 Subject: [PATCH] Fix 104 card deck --- treys/card.py | 1 + treys/deck.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/treys/card.py b/treys/card.py index b66e79c..7956fbf 100644 --- a/treys/card.py +++ b/treys/card.py @@ -29,6 +29,7 @@ class Card: # the basics STR_RANKS: str = '23456789TJQKA' + STR_SUITS: str = 'shdc' INT_RANKS: range = range(13) PRIMES: list[int] = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41] diff --git a/treys/deck.py b/treys/deck.py index 278b75e..7743fca 100644 --- a/treys/deck.py +++ b/treys/deck.py @@ -36,7 +36,7 @@ def GetFullDeck() -> list[int]: # create the standard 52 card deck for rank in Card.STR_RANKS: - for suit, _ in Card.CHAR_SUIT_TO_INT_SUIT.items(): + for suit in Card.STR_SUITS: Deck._FULL_DECK.append(Card.new(rank + suit)) return list(Deck._FULL_DECK) \ No newline at end of file