Author | ntsp |
Submission date | 2011-06-09 09:00:12.264461 |
Rating | 3189 |
Matches played | 5402 |
Win rate | 32.27 |
Use rpsrunner.py to play unranked matches on your computer.
import random
if input == "": # initialize variables for the first round
output = "P"
round = 1
next_r = 3
else:
if round == next_r:
output = "R"
next_r += random.choice([2,3])
else:
output = random.choice(["S","P"])
round += 1