From 8a41a8e4f065da83f878125007698e54b90bb6dd Mon Sep 17 00:00:00 2001 From: Volodymyr Kyiashko Date: Thu, 15 Jun 2023 22:28:22 +0200 Subject: [PATCH] poprawione obstacles --- main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)