test0.2

Authorr0kk0
Submission date2018-12-10 17:05:12.384058
Rating2648
Matches played268
Win rate25.0

Use rpsrunner.py to play unranked matches on your computer.

Source code:

import random

def cyclic_rotate(input, num):
    return ( input[num:-1] + input[0:num] ) 

beated_by= { "R": 0, "P": -1, "S": -2, "": 0 }

output = random.choice( cyclic_rotate( [ "R", "P", "S" ], beated_by[input] ) )