// Constructs a blank tour public Tour() { for (int i = 0; i < TourManager.NumberOfCities(); i++) { tour.Add(null); } }
// Creates a random individual public void GenerateIndividual() { // Loop through all our destination cities and add them to our tour for (int cityIndex = 0; cityIndex < TourManager.NumberOfCities(); cityIndex++) { SetCity(cityIndex, TourManager.GetCity(cityIndex)); } // Randomly reorder the tour tour.Shuffle(); }