Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Time to play some RPS, motherfucker. (Use numbers 1, 2 or 3 to make your choice.")
- running = True
- player2choosing = False
- while running:
- ##Player1choice
- a = input("Player one, choose:\n1. Rock\n2. Paper\n3. Scissors\n")
- if a in ["1","2","3"]:
- a = int(a)
- else:
- print("Please make a valid selection.")
- continue
- player2choosing = True
- ##Player2choice
- while player2choosing:
- b = input("Player two, choose:\n1. Rock\n2. Paper\n3. Scissors\n")
- if b in ["1","2","3"]:
- b = int(b)
- else:
- print("Please make a valid selection.")
- continue
- player2choosing = False
- ##Result
- if a == b:
- print("It's a fucking tie.")
- elif a == 1:
- if b == 3:
- print("Player one wins!")
- else:print("Player two wins!")
- elif a == 2:
- if b == 1:
- print("Player one wins!")
- else: print("Player two wins!")
- elif b == 2:
- print("Player one wins!")
- else: print("Player two wins!")
- newgame = True
- while newgame == True:
- answer = input("Do you want to play again? Y\\N")
- if answer.lower() == 'y':
- newgame = False
- if answer.lower() == 'n':
- newgame = False
- running = False
- else:
- print("Invalid input, please try again.")
- continue
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement