/// <summary> /// Shows the current best generation /// </summary> public void SetBestGeneration() { int[] best = m_Generator.BestGenes; for (int i = 0; i < best.Length; ++i) { if (i <= 0 || i >= best.Length - 1) { continue; } m_Controller.Nodes[i].ResetInformation(); m_Controller.Nodes[i].Walkable = best[i] <= 6; } m_Agent.ClearInformation(); m_Controller.Creator.Reassign(m_Controller.AdjacentMode); GridNode start = m_Controller.StartNode; start.Searched = true; start.Taken = true; GridNode end = m_Controller.EndNode; end.Searched = false; end.Taken = false; m_Agent.Search(start, end); m_Controller.UpdateColors(); }