Author | Lefa |
Submission date | 2019-02-17 15:50:44.861661 |
Rating | 1495 |
Matches played | 243 |
Win rate | 13.17 |
Use rpsrunner.py to play unranked matches on your computer.
import random
#PC=input()
if input=="":
#bfs_dfs=random(0,1)
play=random.choice(["R","P","S"])
else:
prev=input
bfs_dfs=0
repeat=0
play="x"
#print prev
if repeat>0:
repeat-=1
else:
if prev=="R":
play="S"
elif prev=="P":
play="R"
elif prev=="S":
play= "P"
output=play