Beispiel #1
0
        public override string SecondStar()
        {
            var input  = ReadInput();
            var result = TaxiMap.DistanceToFirstIntersection(new Point(0, 0), Direction.North, input);

            return(result.ToString());
        }
Beispiel #2
0
        public override string FirstStar()
        {
            var input  = ReadInput();
            var result = TaxiMap.ShortestPath(new Point(0, 0), Direction.North, input);

            return(result.ToString());
        }
Beispiel #3
0
        public void SecondStarExample(string movements, int expectedDistance)
        {
            var distance = TaxiMap.DistanceToFirstIntersection(new Point(0, 0), Direction.North, movements);

            Assert.Equal(expectedDistance, distance);
        }
Beispiel #4
0
        public void FirstStarExample(string movements, int expectedDistance)
        {
            var distance = TaxiMap.ShortestPath(new Point(0, 0), Direction.North, movements);

            Assert.Equal(expectedDistance, distance);
        }