RPS Project

Authorgroup33
Submission date2019-10-16 23:42:41.819766
Rating5922
Matches played212
Win rate59.91

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))