poprawione obstacles
This commit is contained in:
parent
3dd6b8a9ee
commit
8a41a8e4f0
6
main.py
6
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)
|
||||
|
Loading…
Reference in New Issue
Block a user