CDTRKtestingfunctions1

AuthorCorey White
Submission date2011-06-09 22:01:52.490061
Rating5220
Matches played5569
Win rate50.55

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

Source code:

import random

def randPlay():
    return random.choice(["R","P","S"])

def beats(x):
    if x == "R":
        return "P"
    elif x == "P":
        return "S"
    elif x == "S":
        return "R"
    else:
        return randPlay()

output = randPlay()