beatwsls2

AuthorZedaM
Submission date2017-05-13 15:20:38.363470
Rating3422
Matches played350
Win rate34.29

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

Source code:

import random

if input == "":
    beat={"R":"P","P":"S","S":"R","":""}
    lastin="init"
    lastout="init"
    output=random.choice("RPS")
else:
    if lastout==beat[beat[lastin]]:
        output=beat[lastin]
    elif lastout==beat[lastin]:
        output=beat[lastout]
    else:
        output=random.choice("RPS")

lastin=input
lastout=output