Parcourir la source

Display if DFS succeeded to reach the target tile

DricomDragon il y a 5 ans
Parent
commit
10bd1fbcef
1 fichiers modifiés avec 8 ajouts et 0 suppressions
  1. 8 0
      main.cc

+ 8 - 0
main.cc

@@ -229,8 +229,16 @@ int main()
 	cout << endl << "Depth-First Search" << endl;
 
 	w.markAll(dfsPath);
+	w.markOne(start, ORIGIN);
+	w.markOne(end, TARGET);
 	w.display();
 
+	// Display DFS result
+	if (exitFound)
+		cout << "DFS succeeded to reach the target" << endl;
+	else
+		cout << "FAILURE : DFS failed to reach target" << endl;
+
 	return 0;
 }