Author | Ryan |
Submission date | 2011-06-15 04:20:17.195747 |
Rating | 4080 |
Matches played | 5288 |
Win rate | 39.71 |
Use rpsrunner.py to play unranked matches on your computer.
import random
if input == "":
count=0
running=0
lastchoice=""
if running==0:
running=random.randint(1,5)
lastchoice=random.choice(["P","S","R"])
output=lastchoice
elif running > 0 :
running=running - 1
output=lastchoice
if running%2 == 0 :
output=random.choice(["P","S","R"])