Author | Mihai Maruseac |
Submission date | 2011-06-10 16:26:54.170981 |
Rating | 2114 |
Matches played | 5411 |
Win rate | 22.25 |
Use rpsrunner.py to play unranked matches on your computer.
import random
if input == '':
output = 'R'
elif random.choice(['k', 'k', 'k', 'k', 'k', 'k', 'o']) == 'k':
output = input
else:
output = {'R':'S', 'P':'R', 'S':'P'}[input]