예제 #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());
        }
예제 #2
0
 public void ProcessInstruction(LightInstruction instruction)
 {
     ProcessInstruction(instruction.Mode, instruction.From, instruction.To);
 }