Example #1
0
        public override string PartA(string[] inputs)
        {
            var program  = inputs[0].Split(',').Select(long.Parse).ToArray();
            var computer = new IntecodeComputer(program);
            //computer.OutputToConsole = true;
            PaintingRobot rob = new PaintingRobot(computer);

            rob.Run(0);
            return(rob.PaintedPanelCount.ToString());
        }
Example #2
0
        public override string PartB(string[] inputs)
        {
            var program  = inputs[0].Split(',').Select(long.Parse).ToArray();
            var computer = new IntecodeComputer(program);
            //computer.OutputToConsole = true;
            PaintingRobot rob = new PaintingRobot(computer);

            rob.Run(1);
            rob.Print();
            return("done!");
        }