MCPcopy Create free account
hub / github.com/Mrinank-Bhowmick/python-beginner-projects / __init__

Method __init__

projects/BlackJack/black_jack.py:51–56  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

49
50class Deck:
51 def __init__(self):
52 self.all_cards = []
53 for suit in suits:
54 for rank in ranks:
55 # This assumes the Card class has already been defined!
56 self.all_cards.append(Card(suit, rank))
57
58 def shuffle(self):
59 random.shuffle(self.all_cards)

Callers

nothing calls this directly

Calls 1

CardClass · 0.70

Tested by

no test coverage detected