Author | JSoffer |
Submission date | 2011-05-30 01:38:48.318510 |
Rating | 2310 |
Matches played | 6702 |
Win rate | 17.77 |
Use rpsrunner.py to play unranked matches on your computer.
import time
class Alea:
def __init__(self):
self.actual = int(time.time())
def alea(self):
self.actual = self.actual * 1103515245 + 12345
return (((self.actual >> 16) % 32768) % 3)
aleatorios = Alea()
output = ['R', 'P', 'S'][aleatorios.alea()]