def _initEntities(self): self.player = Player(self) self.entities = [ self.player, Food.randomFood(self), Food.randomFood(self), ]
def shuffleFood(self, food): self.entities.insert(0, Food.randomFood(self)) self.entities.remove(food)