Author | Vitali |
Submission date | 2019-02-28 23:28:16.992963 |
Rating | 6167 |
Matches played | 241 |
Win rate | 63.49 |
Use rpsrunner.py to play unranked matches on your computer.
import random
if input == "":
selection_list = ["R"] * 22 + ["P"] * 22 + ["S"] * 22
else:
random.shuffle(selection_list)
if input == "R":
selection_list.pop(0)
selection_list += ["P"]
elif input == "P":
selection_list.pop(0)
selection_list += ["S"]
elif input == "S":
selection_list.pop(0)
selection_list += ["R"]
output = random.choice(selection_list)