| 104 | |
| 105 | |
| 106 | class Deck: |
| 107 | def __init__(self): |
| 108 | self.Deck = [Card(suit, rank) for suit in SUITS for rank in RANKS] |
| 109 | |
| 110 | def shuffle(self): |
| 111 | random.shuffle(self.Deck) |
| 112 | |
| 113 | def deal_card(self): |
| 114 | return random.choice(self.Deck) |
| 115 | |
| 116 | def __str__(self): |
| 117 | return string_list_join("Deck", self.Deck) |
| 118 | |
| 119 | |
| 120 | def deal(): |