RPS1

AuthorPablo
Submission date2017-02-12 09:25:50.991305
Rating3041
Matches played214
Win rate30.84

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

Source code:

if input == "":
	lastR = lastP = lastS = 0
elif input == "R":
	lastR = 0
	lastP += 1
	lastS += 1
elif input == "P":
	lastP = 0
	lastR += 1
	lastS += 1
elif input == "S":
	lastS = 0
	lastR += 1
	lastP += 1
if lastR > lastP and lastR > lastS:
	output = "R"
elif lastS > lastP:
	output = "S"
else:
	output = "P"