duhderp

Authorslowderp
Submission date2011-06-12 09:24:57.593158
Rating2174
Matches played5349
Win rate22.21

Use rpsrunner.py to play unranked matches on your computer.

Source code:

from random import randint

beat = {'R':'P', 'P':'S', 'S':'R'}
if input in beat.keys():
    opmoves.append(input)
    mymoves.append(mymoves[-1] if randint(0, 1) else opmoves[-1])
else:
    opmoves = []
    mymoves = [beat.keys()[randint(0, 2)]]

output = mymoves[-1]