/// <summary> /// Advances the world to the next generation. /// </summary> public void NextGeneration() { var result = GenerationNumber == 0 ? worldGenerator.RandomGeneration(Size) : worldGenerator.NextGeneration(Generation); GenerationNumber++; AliveCells = result.AliveCells; Generation = result.Generation; IsAlive = result.IsGenerationAlive; }