private BusStopNavigationNode CreateLineMap(LinesConfiguration configuration, string[] names, double[] times, BusStopNavigationNode endBusStop) { string name = names[0]; double timeToNext = times[0]; var initNode = new BusStopNavigationNode(configuration.GetIdByName(name), timeToNext, name); var node = initNode; for (int i = 1; i < names.Length; i++) { name = names[i]; timeToNext = times[i]; var nextNode = new BusStopNavigationNode(configuration.GetIdByName(name), timeToNext, name); node.Next = nextNode; node = nextNode; } node.Next = endBusStop; endBusStop.Next = initNode; return(initNode); }
public Navigation(BusStopNavigationNode startBusStop) { CurrentBusStopNavigationNode = startBusStop; }
public void MoveToNext() { CurrentBusStopNavigationNode = CurrentBusStopNavigationNode.Next; }