Author | Paul |
Submission date | 2013-10-02 09:08:04.752661 |
Rating | 5091 |
Matches played | 646 |
Win rate | 47.99 |
Use rpsrunner.py to play unranked matches on your computer.
import random
if input:
output = {'R' : 'P',
'P' : 'S',
'S' : 'R'}[last]
last = input
else:
output = random.choice(["R","P","S"])
last = random.choice(["R","P","S"])