Author | Jay_jayjay |
Submission date | 2019-11-18 20:10:02.573312 |
Rating | 4068 |
Matches played | 217 |
Win rate | 39.63 |
Use rpsrunner.py to play unranked matches on your computer.
import random
if not input:
output=random.choice("RPS")
history=""
round=0
win = {"R": "P", "P": "S", "S":"R"}
else:
round += 1
history+=input
if round > 100:
output=win[random.choice(list(history))]
else:
output = "R"