Fixed Geometry Turbocharger

This program has been disqualified.


Authordllu
Submission date2011-05-25 18:07:22.155250
Rating5062
Matches played4704
Win rate49.11

Source code:

import random

lastmatch=0

if not input:
	urmoves=""
	mymoves=""
	output = random.choice(['R','P','S'])
else:
	output = random.choice(['R','P','S'])
	urmoves+=input
	for i in range(len(urmoves)-1,20,-1):
		match=0
		j=1
		while mymoves[i-j]==mymoves[len(urmoves)-j]:
			match+=1
			if match>lastmatch:
				lastmatch=match
				if match>20:
					output=urmoves[i]
					break
			j+=1
			
		if match>20:
			break
	
	output =  {'R':'P', 'P':'S', 'S':'R'}[output]

mymoves+=output