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

Method __init__

classicIndianCardMatch.py:24–31  ·  view source on GitHub ↗
(self, suit, rank)

Source from the content-addressed store, hash-verified

22
23class card:
24 def __init__(self, suit, rank):
25 if (suit in SUITS) and (rank in RANKS):
26 self.suit = suit
27 self.rank = rank
28 else:
29 self.suit = None
30 self.rank = None
31 print("Invalid card: ", suit, rank)
32
33 def __str__(self):
34 return self.suit + self.rank

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected