示例#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("#.##");
        }
示例#2
0
 public void UpdateSequence(Neighbour neighbour)
 {
     pathLines = TownHelper.GetTownSequencePath(neighbour.Sequence);
     totalDistanceString.StringText = neighbour.GetFitness().ToString("#.##");
 }
示例#3
0
 public void UpdateSequence(List <int> sequence)
 {
     base.Update(1);
     pathLines = TownHelper.GetTownSequencePath(sequence);
 }