Author | Michael |
Submission date | 2018-03-22 20:10:20.017890 |
Rating | 3013 |
Matches played | 299 |
Win rate | 28.09 |
Use rpsrunner.py to play unranked matches on your computer.
if input == "": # initialize variables for the first round
lastMove = "R"
output = "R"
elif (input == "R" and lastMove == "R"):
output = "P"
elif (input == "R" and lastMove == "P"):
output = "S"
elif (input == "R" and lastMove == "S"):
output = "P"
elif (input == "P" and lastMove == "R"):
output = "S"
elif (input == "P" and lastMove == "P"):
output = "S"
elif (input == "P" and lastMove == "S"):
output = "R"
elif (input == "S" and lastMove == "R"):
output = "P"
elif (input == "S" and lastMove == "P"):
output = "R"
elif (input == "S" and lastMove == "S"):
output = "R"