Author | RANDOM_=D |
Submission date | 2011-05-23 04:42:32.740752 |
Rating | 3407 |
Matches played | 7257 |
Win rate | 28.81 |
Use rpsrunner.py to play unranked matches on your computer.
if input=="": # initialize variables for the first round
rockCount = 150
paperCount = 100
scissorsCount = 50
if input == "R":
rockCount += 2
elif input == "P":
paperCount += 3
elif input == "S":
scissorsCount += 1
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