In the initialize
method, instead of setting self.food
to a list with food positions, you can write:
self.food = []
self.add_food()
self.add_food()
Then at the beginning of the game, two random foods will be waiting for the snake.