Exemplo n.º 1
0
        public void BaseCases(string path1, string path2, int expectedDistance)
        {
            List <string> moves1   = path1.Split(',').Select(x => x.Trim()).ToList();
            List <string> moves2   = path2.Split(',').Select(x => x.Trim()).ToList();
            int           distance = WirePathCalculator.FindClosetIntersectionManhattenDistance(moves1, moves2);

            Assert.Equal(expectedDistance, distance);
        }
Exemplo n.º 2
0
        public void Part1Answers()
        {
            List <string> moves1   = puzzleInputPath1.Split(',').Select(x => x.Trim()).ToList();
            List <string> moves2   = puzzleInputPath2.Split(',').Select(x => x.Trim()).ToList();
            int           distance = WirePathCalculator.FindClosetIntersectionManhattenDistance(moves1, moves2);

            int expectedDistance = 5319;

            Assert.Equal(expectedDistance, distance);
        }