Author | Ben |
Submission date | 2014-03-16 16:28:49.019919 |
Rating | 2362 |
Matches played | 627 |
Win rate | 20.89 |
Use rpsrunner.py to play unranked matches on your computer.
import random
if input == "":
count = {'R':0, 'P':0, 'S':0}
else:
count[input] += 1
if count['R'] < count['S'] and count['R'] < count['P']:
output = 'R'
elif count['S'] < count['R'] and count['S'] < count['P']:
output = 'S'
else:
output = "P"