Author | BDavis |
Submission date | 2013-10-01 21:56:13.684218 |
Rating | 5358 |
Matches played | 649 |
Win rate | 51.16 |
Use rpsrunner.py to play unranked matches on your computer.
import random
print "Starting"
if (input == "" or (roundCount % 3 == 0)):
randomChoice = random.choice([0,1,2])
roundCount = 0
print "init random: " + str(randomChoice)
output = ["R","P","S"][randomChoice]
else:
roundCount += 1
nextChoice = (randomChoice + 1) % 3
print "nextChoice: " + str(nextChoice)
output = ["R","P","S"][nextChoice]