public string PartB() { string filePath = @"Seventeen\DaySeventeenInput.txt"; Dimension dimension = new Dimension(filePath, true); dimension.Run(6); int activeCubes = dimension.CountActiveCubes(); return(activeCubes.ToString()); }
public void Dimension_Run() { string filePath = @"Seventeen\DaySeventeenTestInputA.txt"; var sut = new Dimension(filePath, false); sut.Run(6); var result = sut.CountActiveCubes(); Assert.Equal(112, result); }
public static long CountActiveCubes(List <string> input) { var dimension = new Dimension(input); Console.WriteLine("Input: "); dimension.PrintLayers(); for (var i = 0; i < 6; i++) { Console.WriteLine($"Turn {i}: "); DoTheMagic(dimension); dimension.PrintLayers(); Console.WriteLine(); Console.WriteLine("-----------------------------"); Console.WriteLine(); } dimension.PrintLayers(); return(dimension.CountActiveCubes()); }