Author | Simon Hooker / Aeiedil |
Submission date | 2011-06-18 10:33:58.664021 |
Rating | 3609 |
Matches played | 5085 |
Win rate | 34.77 |
Use rpsrunner.py to play unranked matches on your computer.
# Strayegg Hobo
# Simon Hooker / Aeiedil (simon@strayegg.com)
# The hobo is a simple beast that just takes a guess based on no good logic at alll, hooray
# config if match start
import random
if not input:
# new batch
ursum = 0
validoptions = ["S","P","R"]
# choose a random
output=random.choice(validoptions)
else:
# input will be R P or S
# add to sums and mod
for index,item in enumerate(validoptions):
if item==input:
ursum = (ursum+index+1)%3
output = validoptions[(ursum+1)%3]