Author | Joey |
Submission date | 2012-09-26 17:49:54.090693 |
Rating | 5567 |
Matches played | 776 |
Win rate | 56.7 |
Use rpsrunner.py to play unranked matches on your computer.
import random
if input == '':
r = 0
s = 0
p = 0
output = 'R'
else:
if input == 'R':
r += 1
elif input == 'S':
s += 1
elif input == 'P':
p += 1
output = random.choice(['S'] * p + ['P'] * r + ['R'] * s)