فهرست منبع

Display if DFS succeeded to reach the target tile

DricomDragon 5 سال پیش
والد
کامیت
10bd1fbcef
1فایلهای تغییر یافته به همراه8 افزوده شده و 0 حذف شده
  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;
 }