RPS2

AuthorPablo
Submission date2017-02-12 09:40:35.045503
Rating1531
Matches played391
Win rate13.81

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 = "P"
elif lastS > lastP:
	output = "R"
else:
	output = "S"