Ejemplo n.º 1
0
        public List <Road> PathToRoadList()
        {
            var listRoads = new List <Road>();

            foreach (var road in City.Instance.Roads)
            {
                if (Intersections.FindAll(i => i.Location == road.Start)
                    .FindAll(i => i.Location == road.End).Count > 0)
                {
                    listRoads.Add(road);
                }
            }
            listRoads.Add(GPSSystem.NearestRoad(Start));
            listRoads.Add(GPSSystem.NearestRoad(End));

            return(listRoads);
        }