public static void Execute() { var input = InputTransformDay8.ParseLines(InputGetter.GetInputForDay(8).Trim()); Part1(input); Part2(input); }
public void TestPart2() { var image = Image.Parse(InputTransformDay8.ParseLines("0222112222120000"), 2, 2); var plain = image.Rasterize(); Assert.That(plain.Layers.Count(), Is.EqualTo(1)); Assert.That(plain.Layers[0].Rows.Count(), Is.EqualTo(2)); Assert.That(plain.Layers[0].Rows[0], Is.EquivalentTo(new[] { 0, 1 })); Assert.That(plain.Layers[0].Rows[1], Is.EquivalentTo(new[] { 1, 0 })); }