示例#1
0
        public void SolvePart2()
        {
            string[] input         = System.IO.File.ReadAllLines("../../../input/day_06.txt");
            var      orbitTransfer = new OrbitalTransfer(new OrbitMap(input));

            int count = orbitTransfer.CalculateTransferDistance("YOU", "SAN");

            Assert.Equal(532, count);
        }
示例#2
0
        public void Part2()
        {
            string[] input         = new string[] { "CCCOM)BBB", "BBB)CCC", "CCC)DDD", "DDD)EEE", "EEE)FFF", "BBB)GGG", "GGG)HHH", "DDD)III", "EEE)JJJ", "JJJ)KKK", "KKK)LLL", "KKK)YOU", "III)SAN" };
            var      orbitTransfer = new OrbitalTransfer(new OrbitMap(input));

            int count = orbitTransfer.CalculateTransferDistance("YOU", "SAN");

            Assert.Equal(4, count);
        }