Author | Gandaro |
Submission date | 2011-06-29 20:09:29.200559 |
Rating | 3677 |
Matches played | 4457 |
Win rate | 32.96 |
Use rpsrunner.py to play unranked matches on your computer.
# I bet this won't be the winner.
CHOICES = {
"R": "P",
"P": "S",
"S": "R"
}
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]