示例#1
0
        public override string ProblemTwo()
        {
            var robot = new EmergencyHullPaintingRobot(128, 128, true);

            robot.Execute(Instructions);
            robot.DrawPanel();
            return("See above.");
        }
示例#2
0
        public void DoAction2()
        {
            var paintingMachine = new EmergencyHullPaintingRobot(ReadFile());

            paintingMachine.AddPaintedPanel(new Point(0, 0), ConsoleColor.White);
            paintingMachine.Run();

            paintingMachine.Render();
        }
示例#3
0
        public override string ProblemOne()
        {
            var robot = new EmergencyHullPaintingRobot(128, 128);

            robot.Execute(Instructions);
            var result = robot.Steps;

            return($"{result}");
        }
示例#4
0
        public void RegistrationIdentifierTest()
        {
            var program = File.ReadAllText("Program.txt");

            var robot = new EmergencyHullPaintingRobot(program, Color.White);

            robot.PaintHull();

            VisualizeRegistrationIdentifier(robot.PaintedPanels);
        }
示例#5
0
        public void PaintedPanelsCountTest(Color startingColor, int expectedCount)
        {
            var program = File.ReadAllText("Program.txt");

            var robot = new EmergencyHullPaintingRobot(program, startingColor);

            robot.PaintHull();

            Assert.Equal(expectedCount, robot.PaintedPanels.Count);
        }
示例#6
0
        public void DoAction1()
        {
            var paintingMachine = new EmergencyHullPaintingRobot(ReadFile());

            paintingMachine.Run();
        }