Esempio n. 1
0
        public static void Execute()
        {
            var input = InputTransformDay8.ParseLines(InputGetter.GetInputForDay(8).Trim());

            Part1(input);
            Part2(input);
        }
Esempio n. 2
0
        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 }));
        }