Author | zachpot |
Submission date | 2013-03-24 16:23:18.722686 |
Rating | 3902 |
Matches played | 731 |
Win rate | 35.29 |
Use rpsrunner.py to play unranked matches on your computer.
import random
if input == "":
rockCount = paperCount = scissorsCount = round = 0
elif input == "R":
rockCount += 1
elif input == "P":
paperCount += 1
elif input == "S":
scissorsCount += 1
if round < 500:
output = random.choice(["R","P","S"])
elif rockCount > paperCount and rockCount > scissorsCount:
output = "P"
elif paperCount > scissorsCount:
output = "S"
else:
output = "R"
round += 1