Author | group33 |
Submission date | 2019-10-16 23:42:41.819766 |
Rating | 5922 |
Matches played | 212 |
Win rate | 59.91 |
Use rpsrunner.py to play unranked matches on your computer.
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))