Author | kurodoll |
Submission date | 2019-03-14 02:59:28.523108 |
Rating | 2712 |
Matches played | 254 |
Win rate | 24.02 |
Use rpsrunner.py to play unranked matches on your computer.
x = 0
if input == "":
rockCount = paperCount = scissorsCount = 0
elif input == "R":
rockCount += 1
x = rockCount
elif input == "P":
paperCount += 1
x = paperCount
elif input == "S":
scissorsCount += 1
x = scissorsCount
for i in range(0, 10):
if x % 2 == 0:
x /= 2
else:
x = (x * 3) + 1
res = x % 3
if res == 0:
output = "R"
elif res == 1:
output = "P"
else:
output = "S"