CSingle&Spin

AuthorDuMa
Submission date2019-02-09 15:47:18.704683
Rating3380
Matches played80
Win rate33.75

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

Source code:

global opPMove
global botPMoves
global out
global SqF
global TSqF
global PSq
global SqL
global SqPos
options = ["R","P","S"]
winP = {"R":"P","S":"R","P":"S"}
inp = input
if input == "":
    out = "R"
    opPMove = ""
    botPMoves = []
    PSq = []
    SqF = False
    SqL = 2
    SqPos = 0
elif input == opPMove:
    out = winP[input]
    if not SqF:
        SqF = True
        for x in (0,4):
            if botPMoves.__len__()-x>1:
                PSq.append(botPMoves[botPMoves.__len__()-x-1])
elif input == "R":
    out = "S"
elif input == "S":
    out = "P"
else:
    out = "R"
opPMove = input
botPMoves.append(out)
output = out