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); }
public void EvaluateCorrectMaxSetting(int[] program, int max) { var solver = new AmplifierSolver(program); solver.FindMaxOutput().Should().Be(max); }