Author | Samuel |
Submission date | 2014-06-21 00:10:53.212629 |
Rating | 2211 |
Matches played | 610 |
Win rate | 19.02 |
Use rpsrunner.py to play unranked matches on your computer.
#Rock Paper Scissors AI Created By Samuel Miller 2014
import random
if input == "":
lastMove = 0
output = random.choice(["R","P","S"])
elif input == "R":
lastMove = "R"
elif input == "P":
lstMove = "P"
elif input == "S":
lastMove = "S"
if lastMove == "R":
output = "S"
elif lastMove == "P":
output = "R"
else:
output = "P"