RPS1

AuthorPablo
Submission date2017-02-12 09:25:50.991305
Rating2234
Matches played380
Win rate26.05

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"