Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Suits = (
- 'Spades',
- 'Hearts',
- 'Clubs',
- 'Diamonds'
- )
- Cards = (
- 'Six',
- 'Seven',
- 'Eight',
- 'Nine',
- 'Ten',
- 'Jack',
- 'Queen',
- 'King',
- 'Ace'
- )
- trump = input("SELECT A TRUMP: " + ', '.join(Suits) + "\n")
- print("HELLO USER1, INPUT A CARD", ', '.join(Cards) + "\n")
- user1_card = input("Input a card:")
- user1_suit = input("Input a suit:")
- print("HELLO USER2, INPUT A CARD")
- user2_card = input("Input a card:")
- user2_suit = input("Input a suit:")
- user1_has_trump = False
- user2_has_trump = False
- if user1_suit == trump:
- user1_has_trump = True
- if user2_suit == trump:
- user2_has_trump = True
- # + +
- if user1_has_trump and user2_has_trump:
- if Cards.index(user1_card) > Cards.index(user2_card):
- print("USER 1 WON!!!")
- elif Cards.index(user2_card) > Cards.index(user1_card):
- print("USER 2 WON!!!")
- else:
- print("Draw!")
- exit(0)
- # + -
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement