static void Main(string[] args) { using var inputProvider = new InputProvider <string>("Input.txt", GetString); var inputs = inputProvider.ToList(); var map = new MapBuilder(); inputs.ForEach(w => map.AddRow(w)); map.SetNeighbours(); var part1 = RunTillStable(map, 4); Console.WriteLine($"Part 1: Stabilizes at {part1}"); map = new MapBuilder(); inputs.ForEach(w => map.AddRow(w)); map.SetFirstVisible(); var part2 = RunTillStable(map, 5); Console.WriteLine($"Part 2: Stabilizes at {part2}"); }