public void DrawNetwork() { if (neatGraph == null) { return; } if (smoothFollow != null) { smoothFollow.follow = false; smoothFollow.GotoAllMapView(); } fullMapView.isOn = true; var genomeToDraw = populationCar.GenomeProxies.OrderByDescending(x => x.GenomeProprety.Fitness) .FirstOrDefault(x => !lastDrawnGenomes.Contains(x)); if (genomeToDraw == null) { genomeToDraw = populationCar.GenomeProxies.OrderByDescending(x => x.GenomeProprety.Fitness).First(); } lastDrawnGenomes.Add(genomeToDraw); neatGraph.RemoveAllNodes(); neatGraph.RemoveAllNodes(); neatGraph.genomeProxyToDraw = genomeToDraw; neatGraph.DrawGivenGenomeProxy(); }