Author | dragonfly08 |
Submission date | 2014-10-10 22:21:41.828016 |
Rating | 3667 |
Matches played | 598 |
Win rate | 34.11 |
Use rpsrunner.py to play unranked matches on your computer.
if input == "": # initialize variables for the first round
rockCount = paperCount = scissorsCount = 0
elif input == "R":
rockCount += 2
elif input == "P":
paperCount += 2
elif input == "S":
scissorsCount += 2
if rockCount > paperCount and rockCount > scissorsCount:
output = "P" # paper beats rock
elif paperCount > scissorsCount:
output = "S" # scissors beats paper
else:
output = "R" # rock beats scissors