shuffleraddition

Authorphil
Submission date2016-05-02 00:54:32.174155
Rating5183
Matches played400
Win rate46.25

Use rpsrunner.py to play unranked matches on your computer.

Source code:

import random
array = []
if input == "":
   v = random.randint(0,2)
   if v == 0:
      output = "R"
   elif v == 1:
      output = "P"
   else:
      output = "S"
else:
   v = input
   if v == "R":
      array += ["P"]
   elif v == "P":
      array += ["S"]
   else:
      array += ["R"]
   random.shuffle(array)
   output = array[-1]