This program has been disqualified.
Author | ntsp |
Submission date | 2011-06-09 11:22:32.058819 |
Rating | 5642 |
Matches played | 2867 |
Win rate | 56.3 |
import random
if input == "": # initialize variables for the first round
moves = ["S"]
beat = "R"
output = random.choice(["R","P","S"])
round = 1
next_r = 3
else:
if moves[-1] == input:
moves.append(input)
moves.append(input)
random.shuffle(moves)
beat = moves[0]
if beat == "R":
output = "P"
elif beat == "P":
output = "S"
else:
output = "R"
if round == next_r:
if output == "R":
output = "P"
elif output == "P":
output = "S"
else:
output = "R"
round += 1
next_r += random.choice([2,3,4])