Author | putiferio |
Submission date | 2019-01-11 15:00:30.354145 |
Rating | 5632 |
Matches played | 250 |
Win rate | 54.4 |
Use rpsrunner.py to play unranked matches on your computer.
a1 = 17
a2 = 68
b1 = 15
b2 = 49
c1 = 50
c2 = 18
d = 10
import random
mosse="RPS"
indice={"R":0,"P":1,"S":2}
if not input:
output =mosse[random.randint(0,2)]
else:
i=indice[input]
j=(indice[output]+3-i)%3
if j==0:
x1=a1
x2=a2
if j==1:
x1=b1
x2=b2
if j==2:
x1=c1
x2=c2
r=random.randint(1,96)
if r<x1+1:
k=0
else:
if r<x1+x2+1:
k=1
else: k=2
output=mosse[(i+k+3)%3]
if random.randint(1,d)>1:
output=mosse[random.randint(0,2)]