Author | doeke |
Submission date | 2011-06-08 23:58:00.514671 |
Rating | 3170 |
Matches played | 5444 |
Win rate | 32.24 |
Use rpsrunner.py to play unranked matches on your computer.
import random
types = ['R','P','S']
if not input or not moves:
next = random.randrange(3)
moves = [types[next]] * random.randrange(1, 4)
moves.append(types[next-1])
output = moves.pop(0)