Author | AKohn |
Submission date | 2013-10-23 18:17:00.860240 |
Rating | 4092 |
Matches played | 656 |
Win rate | 34.3 |
Use rpsrunner.py to play unranked matches on your computer.
if input=="":
rWins=pWins=sWins=0
elif input=="R":
if lastMove=="S":
rWins+=1
elif input=="P":
if lastMove=="R":
pWins+=1
elif input=="S":
if lastMove=="P":
sWins+=1
if rWins>pWins and rWins>sWins:
output=lastMove="P"
elif pWins>sWins:
output=lastMove="S"
else:
output=lastMove="R"