Author | ichti |
Submission date | 2015-09-21 08:58:20.350790 |
Rating | 2284 |
Matches played | 470 |
Win rate | 24.89 |
Use rpsrunner.py to play unranked matches on your computer.
import random
if input == "":
opponentPlays = []
myPlays = []
o = random.choice(["R", "P", "S"])
myPlays.append(o)
output = o
else:
opponentPlays.append(input)
print len(opponentPlays)
if (len(opponentPlays) < 3):
o = random.choice(["R", "P", "S"])
myPlays.append(o)
output = o
else:
o = random.choice(["R", "S", "S"])
myPlays.append(o)
output = o