diff --git a/main.py b/main.py index 7a21eb8..99fd42b 100644 --- a/main.py +++ b/main.py @@ -230,11 +230,11 @@ class Game: prediction = self.prediction_road(x,y,mob_image) prediction = "ORK_ARCHER" elif prediction == "SAURON" and self.agent.level >= 3: - self.obstacles[1][10] = False + self.obstacles[self.najlepszaGeneracja[3][0]][self.najlepszaGeneracja[3][1]] = False self.move_agent(self.astar.a_star(goal)) elif prediction == "ORK_INFANTRY": - self.obstacles[10][4] = False + self.obstacles[self.najlepszaGeneracja[2][0]][self.najlepszaGeneracja[2][1]] = False self.move_agent(self.astar.a_star(goal)) if self.agent.current_health < self.agent.max_health: goal = (self.flower.x//TILE_SIZE, self.flower.y//TILE_SIZE) @@ -246,7 +246,7 @@ class Game: prediction = self.prediction_road(x,y,mob_image) prediction = "SAURON" elif prediction == "ORK_ARCHER": - self.obstacles[10][10] = False + self.obstacles[self.najlepszaGeneracja[1][0]][self.najlepszaGeneracja[1][1]] = False self.move_agent(self.astar.a_star(goal)) if self.agent.current_health < self.agent.max_health: goal = (self.flower.x//TILE_SIZE, self.flower.y//TILE_SIZE)