예제 #1
0
        public static void Part2()
        {
            var program  = Intcode.Computer.Parse(m_input);
            var computer = new Intcode.Day9Computer();
            var hull     = new Hull();

            hull[0, 0] = true;

            computer.Initialize(program);

            var robot = new Robot(computer, hull);

            robot.Execute();

            //Console.WriteLine($"width: {hull.Width} height: {hull.Height}");
            for (var y = 0; y <= hull.Height; y++)
            {
                for (var x = 0; x <= hull.Width; x++)
                {
                    Console.Write(hull[x, y] ? "*" : " ");
                }

                Console.WriteLine();
            }
        }
예제 #2
0
        public static void Part1()
        {
            var program  = Intcode.Computer.Parse(m_input);
            var computer = new Intcode.Day9Computer();

            computer.Initialize(program);

            var robot = new Robot(computer, new Hull());

            robot.Execute();
        }