Ejemplo n.º 1
0
        public void UpdateSequence(Individual individual)
        {
            // Convert our sequence of ints to the 2D line representations to be drawn on the screen.
            pathLines.Clear();
            pathLines.AddRange(TownHelper.GetTownSequencePath(individual.Sequence));

            // Convert the fitness into a format that is easily digestable and update the value on screen
            // Format: 1234.56
            totalDistanceString.StringText = individual.GetFitness().ToString("#.##");
        }
Ejemplo n.º 2
0
 public void UpdateSequence(Neighbour neighbour)
 {
     pathLines = TownHelper.GetTownSequencePath(neighbour.Sequence);
     totalDistanceString.StringText = neighbour.GetFitness().ToString("#.##");
 }
Ejemplo n.º 3
0
 public void UpdateSequence(List <int> sequence)
 {
     base.Update(1);
     pathLines = TownHelper.GetTownSequencePath(sequence);
 }