From c0fe5766b0903d9396dcf095f425358cda345f67 Mon Sep 17 00:00:00 2001 From: Paulina Smierzchalska Date: Sun, 28 Apr 2024 13:17:08 +0200 Subject: [PATCH] fix: brakowalo total_cost przy wylowywaniu A_star2 w App.py --- App.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/App.py b/App.py index f6722de..090d36d 100644 --- a/App.py +++ b/App.py @@ -15,8 +15,8 @@ import random bfs1_flag=False bfs2_flag=False #Change this lines to show different bfs implementation bfs3_flag=False -Astar = True -Astar2 = False +Astar = False +Astar2 = True if bfs3_flag or Astar or Astar2: Pole.stoneFlag = True @@ -97,7 +97,7 @@ def init_demo(): #Demo purpose print_to_console("Nie można znaleźć ścieżki A*") # Wyświetl komunikat, jeśli nie znaleziono ścieżki if (Astar2): - aStarRoot2,cost_list= AStar.A_star2({'x': 0, 'y': 0, 'direction': "E"}, pole, goalTreasure) + aStarRoot2,cost_list, total_cost= AStar.A_star2({'x': 0, 'y': 0, 'direction': "E"}, pole, goalTreasure) if aStarRoot2: print("Pełna ścieżka agenta:") aStarRoot2.reverse()