Author | lala |
Submission date | 2011-07-08 12:01:15.518777 |
Rating | 5872 |
Matches played | 4149 |
Win rate | 59.15 |
Use rpsrunner.py to play unranked matches on your computer.
import random
WIN = {"R":"P","P":"S","S":"R"}
if not input:
buf = ["R","S","P"]
output = "P"
else:
buf.append(input)
output = random.choice(buf)
output = WIN[output]