Author | SuperMan |
Submission date | 2012-09-27 16:46:36.789799 |
Rating | 4355 |
Matches played | 771 |
Win rate | 42.8 |
Use rpsrunner.py to play unranked matches on your computer.
import random
if input == "":
beater = 'R'
same = 'P'
var = 1
output = random.choice(['P','R','S'])
elif var == 1:
output = same
if input == 'R':
same = 'R'
beater = 'P'
if input == 'P':
same = 'P'
beater = 'S'
if input == 'S':
same = 'S'
beater = 'R'
var = 0
else:
var = 1
output = beater