Esempio n. 1
0
        static void Test2()
        {
            var grid = new LightGrid();

            foreach (var light in grid)
            {
                Console.WriteLine($"{light.X}, {light.Y}, {light.Brightness}");
            }
        }
Esempio n. 2
0
        static void Main()
        {
            var data = File.ReadLines("data.txt").ToList();

            var grid = new LightGrid();

            grid.Parse(data);
            Console.WriteLine($"Brightness: {grid.Brightness()}");

            var grid2 = new LightGrid();

            grid2.ParseSlowlyUsingLinq(data);
            Console.WriteLine($"Brightness: {grid.Brightness()}");
        }