Exemplo n.º 1
0
    def __init__(self, copy = None):

        if copy is None:
            # Get a full bag from the Alphabet; this varies between languages
            self._tiles = Alphabet.full_bag()
        else:
            # Copy constructor: initialize from another Bag
            self._tiles = copy._tiles
Exemplo n.º 2
0
 def is_full(self):
     """ Returns True if the bag is full, i.e. no tiles have been drawn """
     return self.num_tiles() == len(Alphabet.full_bag())