| Author | gafe |
| Submission date | 2014-10-17 14:45:46.809839 |
| Rating | 5128 |
| Matches played | 582 |
| Win rate | 49.14 |
Use rpsrunner.py to play unranked matches on your computer.
import random
if input == "":
output = random.choice(["R","P","S"])
lastinput=""
if lastinput == "R" :
output = random.choice(["R","P"])
if lastinput == "P" :
output= random.choice(["P","S"])
if lastinput == "S" :
output=random.choice(["S","R"])
lastinput=input
if random.choice([1,2,3]) == 2:
output=random.choice(["P","R","S"])
if random.choice(["R","P","S"]) == input:
output=random.choice(["R","S"])