Author | Gandaro |
Submission date | 2011-06-29 19:55:29.758877 |
Rating | 1921 |
Matches played | 4983 |
Win rate | 14.55 |
Use rpsrunner.py to play unranked matches on your computer.
# I bet this won't be the winner.
CHOICES = {
"R": "S",
"P": "R",
"S": "P"
}
if input == "":
count = {}
count['R'] = count['P'] = count['S'] = 0
else:
count[input] += 1
for name, num in count.iteritems():
if num == max(count.itervalues()):
mostly_used = name
break
output = CHOICES[mostly_used]