Exemplo n.º 1
0
        public void Day12_Example_Part2_OK()
        {
            var sut = new WayPointNavigator();

            foreach (var leg in testData)
            {
                sut.Move(leg);
            }
            long actual = sut.AbsoluteDistanceTravelled();

            Assert.Equal(286, actual);
        }
Exemplo n.º 2
0
        public void Day12_RainRisk_Part2_OK()
        {
            var lines = DailyDataUtilities.ReadLinesFromFile("Day12Data.txt");

            Assert.Equal(786, lines.Length);
            var sut = new WayPointNavigator();

            foreach (var leg in lines)
            {
                sut.Move(leg);
            }
            long actual = sut.AbsoluteDistanceTravelled();

            Assert.Equal(89936, actual);
        }