Example #1
0
        static void PartTwo(string[] input)
        {
            var grid  = new Grid(input);
            var virus = new Virus();

            for (int i = 0; i < 10_000_000; i++)
            {
                virus.Work2(grid);
                if (i % 100_000 == 0)
                {
                    Console.WriteLine("Working... " + (i / 100_000) + "%");
                }
            }
            Console.WriteLine(virus.InfectionCount);
        }