toungetwister

This program has been disqualified.


Authorphillip
Submission date2013-07-29 02:19:46.517549
Rating4051
Matches played37
Win rate37.84

Source code:

import random
def mevsrand():
   data = op[:]
   random.shuffle(data)
   totald = 0
   totalop = 0
   for i in range(0,len(op)):
      if (moves[data[i]]-moves[op[i]]+3)%3 == 1:
         totald += 1
      elif (moves[data[i]]- moves[op[i]]+3)%3 == 2:
         totalop += 1
      else:
         pass
   if totald > totalop:
      output = data[-1]
   else:
      output = op[-1]
if input=="":
   op = []
   moves = {"R":0, "P":1, "S":2}
   output = random.choice(["R","P","S"])
if input == "R":
   op += ["P"]
   mevsrand()
if input == "P":
   op += ["S"]
   mevsrand()
if input == "S":
   op += ["R"]
   mevsrand()