fixed bot

AuthorMichael
Submission date2018-03-22 20:12:35.417550
Rating3419
Matches played299
Win rate35.79

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

Source code:

if input == "": # initialize variables for the first round
        lastMove = "R"
	output = "R"
elif (input == "R" and lastMove == "R"):
	output = "P"
        lastMove = "P"
elif (input == "R" and lastMove == "P"):
	output = "S"
        lastMove = "S"
elif (input == "R" and lastMove == "S"):
	output = "P"
        lastMove = "P"
elif (input == "P" and lastMove == "R"):
	output = "S"
        lastMove = "S"
elif (input == "P" and lastMove == "P"):
	output = "S"
        lastMove = "S"
elif (input == "P" and lastMove == "S"):
	output = "R"
        lastMove = "R"
elif (input == "S" and lastMove == "R"):
	output = "P"
        lastMove = "P"
elif (input == "S" and lastMove == "P"):
	output = "R"
        lastMove = "R"
elif (input == "S" and lastMove == "S"):
	output = "R"
        lastMove = "R"