PlayerAI ReusePlayerAI(List <int> Chromo) { if (DiscardedChildren.Count <= 0) { throw new Exception("No Discarded children left to use."); } PlayerAI new_child = DiscardedChildren.Dequeue(); new_child.ResetAi(); new_child.fitness = Fitness(Chromo); new_child.Chromosome = Chromo; new_child.GetComponent <PlayerScript>().Spawn = SpawnPoint.gameObject; return(new_child); }