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

            magician.Load(lines);

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

            magician.Load(lines);

            return(magician.SortInstructions());
        }
Beispiel #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));
        }
Beispiel #4
0
        public void FindSolutionToPart1()
        {
            var magician = new InstructionMagician();

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

            var instructions = magician.SortInstructions();

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