i_beat_your_last

Authorcoding_all_night
Submission date2013-10-03 05:51:21.285909
Rating4801
Matches played642
Win rate45.33

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

Source code:

import random

# testing
# input = ""
# input = "R"
# input = "P"
# input = "S"

def randomChoice():
	choice=random.randint(1,3)
	# print choice
	if choice == 1:
		return "R"
	elif choice == 2: 
		return "P"
	elif choice==3:
		return "S"

if input=="":
	output = randomChoice()
elif input=="R":
	output = "P"
elif input == "P":
	output="S"
elif input == "S":
	output="R"		

#print output