MCPcopy Create free account
hub / github.com/geekcomputers/Python / __init__

Method __init__

blackJackGUI.py:35–42  ·  view source on GitHub ↗
(self, suit, rank)

Source from the content-addressed store, hash-verified

33
34class Card:
35 def __init__(self, suit, rank):
36 if (suit in SUITS) and (rank in RANKS):
37 self.suit = suit
38 self.rank = rank
39 else:
40 self.suit = None
41 self.rank = None
42 print(("Invalid card: ", suit, rank))
43
44 def __str__(self):
45 return self.suit + self.rank

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected