code: def addTile(self, value=None, choices=None):
          
          if choices is None:
              choices = [2] * 9 + [4]
  
          if value:
              choices = [value]
  
          v = random.choice(choices)
          empty = self.getEmptyCells()
          if empty:
              x, y = random.choice(empty)
              self.setCell(x, y, v)
docs: add a random tile in an empty cell
            value: value of the tile to add.
            choices: a list of possible choices for the value of the tile. if
                     ``None`` (the default), it uses
                     ``[2, 2, 2, 2, 2, 2, 2, 2, 2, 4]``.