This commit is contained in:
Xevion
2019-07-13 04:16:23 -05:00
parent f10c9ee99c
commit d558cf2d6c
15 changed files with 90 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
from random import choices
from string import ascii_uppercase
from itertools import product
from random import shuffle
nums = (str(x).zfill(3) for x in range(1000))
front = (''.join(fr) for fr in product(ascii_uppercase, ascii_uppercase))
names = [l + n for l, n in product(front, nums)]
shuffle(names)
name_iter = iter(names)
class Robot(object):
def __init__(self):
self.reset()
def reset(self):
self.name = next(name_iter)