Beispiel #1
0
        public object SolvePartOne()
        {
            var grid  = new BinaryLightingGrid();
            var lines = InputLineParser.GetAllLines(Day06Input.INSTRUCTIONS);

            foreach (var line in lines)
            {
                var instruction = new LightInstruction(line);
                grid.ProcessInstruction(instruction);
            }

            return(grid.HowManyLightsAreLit());
        }
Beispiel #2
0
 public void ProcessInstruction(LightInstruction instruction)
 {
     ProcessInstruction(instruction.Mode, instruction.From, instruction.To);
 }