Author | gobang |
Submission date | 2011-07-06 15:03:14.024690 |
Rating | 2174 |
Matches played | 4304 |
Win rate | 17.29 |
Use rpsrunner.py to play unranked matches on your computer.
scoring = {
"R": {
"R": 0,
"P": -1,
"S": 1
},
"P": {
"R": 1,
"P": 0,
"S": -1
},
"S": {
"R": -1,
"P": 1,
"S": 0
}
}
output = "S"
if input:
for k,v in scoring[input].iteritems() :
if v == 1:
output = k