Esempio n. 1
0
        public void ShortestPathLengthReturnsCorrectValue(string path, int expected)
        {
            var sut    = new AdventOfCode2016.Day1.Day1(path);
            var actual = sut.GetShortestPathLength();

            Assert.Equal(expected, actual);
        }
Esempio n. 2
0
        private static void Day1()
        {
            var    reader = new StreamReader(@"..\..\Day1\input.txt");
            string input  = reader.ReadToEnd();

            var d1p1   = new Day1.Day1(input);
            var length = d1p1.GetShortestPathLength();

            Console.WriteLine($"Puzzle 1: {length}");

            var d1p2          = new Day1.Day1(input);
            var firstCrossing = d1p2.GetShortestPathLength(stopAtFirstCrossing: true);

            Console.WriteLine($"Puzzle 2: {firstCrossing}");
        }