testCopied3

AuthorTidyMaze
Submission date2018-08-26 15:12:50.778435
Rating4307
Matches played286
Win rate39.51

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

Source code:

def beating(symb):
    return {
        "R": "P",
        "P": "S",
        "S": "R"
    }.get(symb)

count = {
    "R": 0,
    "P": 0,
    "S": 0
}

if input == "": # initialize variables for the first round
	rockCount = paperCount = scissorsCount = 0
else:
    count[input] += 1
if count["R"] > count["P"] and count["R"] > count["S"]:
	output = beating("R")
elif count["P"] > count["S"]:
	output = beating("P")
else:
	output = beating("S")