void Evaluation(bool full) { int count = 0; int count1 = 0; if (A.Cities.Count == 0) { EditorUtility.DisplayDialog("Alert", "Please load the cities", "OK"); return; } else { if (A.begin == "" && A.end == "") { EditorUtility.DisplayDialog("Alert", "TO and FROM Cities cannot be empty", "OK"); return; } else if (A.begin == "" && A.end != "") { EditorUtility.DisplayDialog("Alert", "TO City cannot be empty", "OK"); return; } else if (A.begin != "" && A.end == "") { EditorUtility.DisplayDialog("Alert", "FROM City cannot be empty", "OK"); return; } else if (A.begin != "" && A.end != "") { for (int i = 0; i < A.Cities.Count; i++) { if (A.begin != "" && A.end != "" && A.begin == A.Cities[i].name) { count++; } if (A.begin != "" && A.end != "" && A.end == A.Cities[i].name) { count1++; } } if (A.begin != "" && A.end != "" && count == 0 && count1 == 0) { EditorUtility.DisplayDialog("Alert", "TO and FROM Cities are not in City list", "OK"); return; } else if (A.begin != "" && count == 0 && count1 != 0) { EditorUtility.DisplayDialog("Alert", "TO City is not in City list", "OK"); return; } else if (A.end != "" && count1 == 0 && count != 0) { EditorUtility.DisplayDialog("Alert", "FROM City is not in City list", "OK"); return; } else if (count != 0 && count1 != 0) { if (A.begin == A.end) { EditorUtility.DisplayDialog("Alert", "TO and FROM City cannot be the same", "OK"); return; } } } } if (full) { if (A.Nodes.Count > 0) { A.Nodes.Clear(); A.open.Clear(); A.closed.Clear(); A.result = ""; A.routeFound = false; A.AStar(); } else { A.AStar(); } } else if (!full) { A.AStarStep(); } }