naprawiony bfs 3

This commit is contained in:
s464859 2022-04-07 16:50:53 +02:00
parent e5f4c9d466
commit 139068130b

View File

@ -21,7 +21,7 @@ class AI:
def ready(self):
self.saper.set_map(self.current_map)
goal_state = [minesweeper.Map.mines[0].position_x, minesweeper.Map.mines[0].position_y]
goal_state = [self.current_map.mines[0].position_x, self.current_map.mines[0].position_y]
print(goal_state)
find_path = bfs.BFS(self.saper)
@ -80,8 +80,8 @@ class AI:
way = self.the_way.pop(0)
self.saper.rotate(way)
self.saper.move()
else:
goal_state = [minesweeper.Map.mines[0].position_x, minesweeper.Map.mines[0].position_y]
elif len(self.current_map.mines)!=0:
goal_state = [self.current_map.mines[0].position_x, self.current_map.mines[0].position_y]
print(goal_state)
find_path = bfs.BFS(self.saper)