code: def expand_seed(self, start_seed, num_iterations, val):
          self.grd.set_tile(start_seed[0], start_seed[1], val)
          cur_pos = [start_seed[0], start_seed[1]]
          while num_iterations > 0:
              num_iterations -= 1
              for y in range(cur_pos[0]-randint(0,2), cur_pos[0] + randint(0,2)):
                  for x in range(cur_pos[1]-randint(0,2), cur_pos[1] + randint(0,2)):
                      if x < self.grd.grid_width and x >= 0 and y >= 0 and y < self.grd.grid_height:
                          if self.grd.get_tile(y,x) != val:
                              self.grd.set_tile(y, x, TERRAIN_LAND)
                              num_iterations -= 1
              new_x = cur_pos[0] + randint(0,3)-2
              new_y = cur_pos[1] + randint(0,3)-2
              if new_x > self.grd.grid_width - 1:
                  new_x = 0
              if new_y > self.grd.grid_height - 1:
                  new_y = 0
              if new_x < 0:
                  new_x = self.grd.grid_width - 1
              if new_y < 0:
                  new_y = self.grd.grid_height - 1
              cur_pos = [new_y, new_x]