MCPcopy Index your code
hub / github.com/geekcomputers/Python / deck

Class deck

classicIndianCardMatch.py:43–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41
42
43class deck:
44 def __init__(self):
45 self.deck = [card(suit, rank) for suit in SUITS for rank in RANKS]
46
47 def shuffle(self):
48 random.shuffle(self.deck)
49
50 def dealCard(self):
51 return random.choice(self.deck)
52
53 def __str__(self):
54 print(self.deck)
55
56
57# Begin play

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected