Sequence Test

AuthorAntiDog
Submission date2018-08-07 12:53:31.950520
Rating2450
Matches played288
Win rate23.61

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

Source code:

if input == "":
	output = "P"
else:
	r = 0
	p = 0
	s = 0
	for i in range(1,len(input)):
			searchsequence = input[:i]
			nextresults = input.split(searchsequence)
			for res[0] in nextresults:
				if res == "R":
					r += 1
				if res == "P":
					p += 1
				if res == "S":
					s += 1
	if r > p:
		if r > s:
			output = "R"
	elif p > s:
		if p > s:
			output = "P"
	else:
		output = "S"