Ejemplo n.º 1
0
        public StopsInTripsList GetAllPossibleTripsBetweenStations(StationsPair stations, int exactStopsInBetween)
        {
            var stopsList = _metroNetwork.GetAllPossibleTripsBetweenStations(stations.Start, stations.End, exactStopsInBetween).ToList();

            return(new StopsInTripsList {
                StopsInTrips = stopsList, Count = stopsList.Count
            });
        }
Ejemplo n.º 2
0
        public object GetShortestTripDistance(StationsPair stations)
        {
            var distance = _metroNetwork.GetPathDistanceBetweenStations(stations.Start, stations.End);

            if (distance < 0)
            {
                return("NO SUCH ROUTE");
            }
            return((int)distance);
        }