RPS Project

Authorgroup33
Submission date2019-10-16 23:42:41.819766
Rating6207
Matches played201
Win rate61.19

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

Source code:

import random

previous = input

if previous == "":
  pattern = "RPS"

def beat(choise):
  if choise == "R":
    return "P"
  elif choise == "P":
    return "S"
  else:
    return "R"

if previous != "":
  pattern += previous

output = beat(random.choice(pattern))