Scrub

AuthorScrub
Submission date2017-12-04 16:24:52.632040
Rating3985
Matches played304
Win rate35.86

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

Source code:

import random 


if input == "": 
	rockCount = paperCount = scissorsCount = 0
	opponentMoves = 0
	n = opponentMoves

elif input == "R":
	rockCount += 1
	opponentMoves += 1

elif input == "P":
	paperCount += 1
	opponentMoves += 1
	
elif input == "S":
	scissorsCount += 1
	opponentMoves += 1



if rockCount > paperCount and rockCount > scissorsCount:
	output = "P" 

elif paperCount > scissorsCount:
	output = "S" 

else:
	output = "R"