Author | tomtom |
Submission date | 2017-01-12 22:48:09.877670 |
Rating | 6065 |
Matches played | 387 |
Win rate | 59.43 |
Use rpsrunner.py to play unranked matches on your computer.
import random
if input == '':
history = ["R", "P", "S"]
else:
history.append(input)
what_beats = {"R": "P", "P": "S", "S": "R"}
x = random.choice(history)
output = what_beats[x]