Beispiel #1
0
        private static void Day24()
        {
            var input = File.ReadAllLines(@"..\..\Day24\input.txt");
            var d24   = new Day24.Day24(input);

            Console.WriteLine($"Shortest path = {d24.FindShortestPath()}");
            Console.WriteLine($"Shortest cycle = {d24.FindShortestPath(cycle: true)}");
        }
Beispiel #2
0
        public void ExampleIsCorrect()
        {
            var input    = new string[] { "###########", "#0.1.....2#", "#.#######.#", "#4.......3#", "###########" };
            var expected = 14;
            var sut      = new AdventOfCode2016.Day24.Day24(input);
            var actual   = sut.FindShortestPath();

            Assert.Equal(expected, actual);
        }