Author | kyle morrison |
Submission date | 2011-06-09 09:18:59.064694 |
Rating | 4874 |
Matches played | 5645 |
Win rate | 49.25 |
Use rpsrunner.py to play unranked matches on your computer.
import random
moves = {'R': 'P', 'P': 'S', 'S': 'R'}
if len(input) < 25:
output = random.choice(moves.keys())
else:
possible = [moves[i] for i in input]
output = random.choice(possible)