예제 #1
0
        public int TestMagicianTimeCalculation(params string[] lines)
        {
            var magician = new InstructionMagician();

            magician.Load(lines);

            return(magician.CalculateConstructionTime(2));
        }
예제 #2
0
        public string TestMagicianSorting(params string[] lines)
        {
            var magician = new InstructionMagician();

            magician.Load(lines);

            return(magician.SortInstructions());
        }
예제 #3
0
        public void FindSolutionToPart2()
        {
            var magician = new InstructionMagician(60);

            magician.Load("Day7/input.txt");

            var instructions = magician.CalculateConstructionTime(5);

            Assert.That(instructions, Is.EqualTo(1017));
        }
예제 #4
0
        public void FindSolutionToPart1()
        {
            var magician = new InstructionMagician();

            magician.Load("Day7/input.txt");

            var instructions = magician.SortInstructions();

            Assert.That(instructions, Is.EqualTo("BGJCNLQUYIFMOEZTADKSPVXRHW"));
        }