def add(self): obstacle = Obstacle(self.screen, self.window_size) obstacle.gen_random_parameters_from_bottom() self.collection.append(obstacle)