Author | Gandaro |
Submission date | 2011-06-29 19:32:05.855938 |
Rating | 2018 |
Matches played | 4738 |
Win rate | 19.65 |
Use rpsrunner.py to play unranked matches on your computer.
# I bet this won't we the winner :-)
CHOICES = {
"R": "S",
"P": "R",
"S": "P"
}
if input == "":
count = {}
count['R'] = count['P'] = count['S'] = 0
else:
count[input] += 1
mostly_used = max(count)
output = CHOICES[mostly_used]