Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from cardLib.const import SUITS, VALUES, RANKS
- class Card(object):
- def __init__(self, value, suit):
- try:
- assert(value in VALUES))
- self.value=value
- except AssertionError:
- print("Invalid value assigned to card")
- try:
- assert(suit in SUITS)
- self.suit=suit
- except AssertionError:
- print("Invalid suit assigned to card")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement