Exemple #1
0
        static void Day7()
        {
            WriteLine("");
            var program = "Day7/input.txt".ReadLines().Single().Split(",").Select(int.Parse).ToArray();

            WriteLine("Part 1: ");
            var solver = new AmplifierSolver(program);
            int max    = solver.FindMaxOutput();

            WriteLine(max);
            WriteLine("Part 2: ");
            int max2 = solver.FindMaxWithFeedback();

            WriteLine(max2);
        }
Exemple #2
0
        public void EvaluateCorrectMaxSetting(int[] program, int max)
        {
            var solver = new AmplifierSolver(program);

            solver.FindMaxOutput().Should().Be(max);
        }