diff --git a/classes/ai.py b/classes/ai.py index 7c1cae5..b8f3d8d 100644 --- a/classes/ai.py +++ b/classes/ai.py @@ -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() \ No newline at end of file + 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) \ No newline at end of file