dalek test 5

Authornk!
Submission date2017-12-08 19:10:14.253810
Rating4559
Matches played316
Win rate48.1

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

Source code:

import random
opponentMoves =[]
if input == "":
    opponentMoves =[]
elif input == "R":
    opponentMoves += "R"
elif input == "P":
    opponentMoves += "P"
elif input == "S":
    opponentMoves += "S"

def analyzeList(opponentMoves, L):
    opponentMoves.index(L)
    return opponentMoves[opponentMoves.index + len(L)]

if len(opponentMoves)<=9:
    output = random.choice(["R","P","S"])
else:
    L = opponentMoves[-4:]
    analyzeList(opponentMoves, L)
    if analyzeList(opponentMoves, L)== "R":
        output= "P"
    if analyzeList(opponentMoves, L)== "P":
        output= "S"
    if analyzeList(opponentMoves, L)== "S":
        output= "R"
    else:
        output= random.choice(["R","P","S"])