Author | Shawn |
Submission date | 2011-06-10 20:36:58.531290 |
Rating | 2332 |
Matches played | 5490 |
Win rate | 20.66 |
Use rpsrunner.py to play unranked matches on your computer.
import random;
if input == "": # initialize variables for the first round
count = 0;
count += 1;
if count % 2 == 0:
if input == "R":
output = "S";
elif input == "P":
output = "R";
elif input == "S":
output = "P";
else:
output = random.choice(["R","P","S"]);