Author | Pablo |
Submission date | 2017-02-12 09:40:35.045503 |
Rating | 1531 |
Matches played | 391 |
Win rate | 13.81 |
Use rpsrunner.py to play unranked matches on your computer.
if input == "":
lastR = lastP = lastS = 0
elif input == "R":
lastR = 0
lastP += 1
lastS += 1
elif input == "P":
lastP = 0
lastR += 1
lastS += 1
elif input == "S":
lastS = 0
lastR += 1
lastP += 1
if lastR > lastP and lastR > lastS:
output = "P"
elif lastS > lastP:
output = "R"
else:
output = "S"