Author | jrr |
Submission date | 2013-10-04 18:34:19.164341 |
Rating | 3126 |
Matches played | 632 |
Win rate | 30.38 |
Use rpsrunner.py to play unranked matches on your computer.
import random
RPS = ["R","P","S"]
if input == "":
output = random.choice(RPS)
cur = 1
lim = 1
last = output
elif cur < lim:
cur += 1
output = last
else:
cur = 1
lim += 1
if last == "R":
output = "S"
elif last == "P":
output = "R"
else:
output = "P"
last = output