def __init__(self, width, height, color, grid): EnvironmentObject.__init__(self, width, height, color, grid) self.reward = 0 self.gradientsCreated = False self.foodStrengthRounds = 0 Food.dictionaryOfFoodObjects[(self.gridX, self.gridY)] = self self.grid.cellMatrix[self.gridX][self.gridY].foodIntensity = 1 self.grid.cellMatrix[self.gridX][self.gridY].food = self
def __init__(self,width,height,color,grid): EnvironmentObject.__init__(self,width,height,color,grid) self.reward = 0 self.gradientsCreated = False self.foodStrengthRounds = 0 Food.dictionaryOfFoodObjects[(self.gridX,self.gridY)] = self self.grid.cellMatrix[self.gridX][self.gridY].foodIntensity = 1 self.grid.cellMatrix[self.gridX][self.gridY].food = self
def __init__(self,width,height,color,grid): EnvironmentObject.__init__(self,width,height,color,grid) #Already initialized at a random position by superclass Obstacle.dictionaryOfObstacles[(self.gridX,self.gridY)] = self
def __init__(self, width, height, color, grid): EnvironmentObject.__init__(self, width, height, color, grid) #Already initialized at a random position by superclass Obstacle.dictionaryOfObstacles[(self.gridX, self.gridY)] = self