Author | sn3098 |
Submission date | 2011-06-09 05:14:23.351686 |
Rating | 2485 |
Matches played | 5256 |
Win rate | 23.57 |
Use rpsrunner.py to play unranked matches on your computer.
import random
if input=='':
hy=["R","P","S"]
count=0
if input=='R':
ex=['R']*random.randint(1,5)
hy.extend(ex)
elif input=='P':
hy.extend(['S'])
else:
hy.extend(['P'])
output = random.choice(hy)
if count %7 ==0:
hy.pop(-1)
count +=1