naprawiony bfs 2

This commit is contained in:
s464859 2022-04-07 16:47:58 +02:00
parent bec25a4e4a
commit e5f4c9d466

View File

@ -79,4 +79,10 @@ class AI:
if len(self.the_way)>0:
way = self.the_way.pop(0)
self.saper.rotate(way)
self.saper.move()
self.saper.move()
else:
goal_state = [minesweeper.Map.mines[0].position_x, minesweeper.Map.mines[0].position_y]
print(goal_state)
find_path = bfs.BFS(self.saper)
self.the_way = find_path.graphsearch([], [], bfs.BFS.successor, goal_state)