public void MoveGenerationsForward(long generations = 1) { for (long i = 0; i < generations; i++) { _currentPotRow = _currentPotRow.NextGeneration(); if (i % 100 == 0) { Console.WriteLine($"At generation {i} number of plants {_currentPotRow.CurrentNumberOfPlants}"); Console.WriteLine(_currentPotRow.CurrentState); } } }
public LifeCyclePotrow(string initial, IEnumerable <string> spreadCombinations) { _currentPotRow = new PotRow(0, initial, spreadCombinations); File.AppendAllLines("out.txt", new[] { _currentPotRow.CurrentState }); Console.WriteLine(_currentPotRow.CurrentState); }