removed 1st edition code

This commit is contained in:
Luciano Ramalho
2020-03-11 18:03:55 -03:00
parent 1be97eea3e
commit 506d343843
460 changed files with 0 additions and 108428 deletions

View File

@@ -1,28 +0,0 @@
# BEGIN TOMBOLA_BINGO
import random
from tombola import Tombola
class BingoCage(Tombola): # <1>
def __init__(self, items):
self._randomizer = random.SystemRandom() # <2>
self._items = []
self.load(items) # <3>
def load(self, items):
self._items.extend(items)
self._randomizer.shuffle(self._items) # <4>
def pick(self): # <5>
try:
return self._items.pop()
except IndexError:
raise LookupError('pick from empty BingoCage')
def __call__(self): # <7>
self.pick()
# END TOMBOLA_BINGO