示例#1
0
        public Transfer[] GetTransfers(MetroLane[] lanes)
        {
            Transfer[] transferStations = new Transfer[lanes.Length - 1];
            int        j = 0;

            for (int i = 0; i < lanes.Length; i++)
            {
                MetroLane otherLane = lanes[i];
                string    trStation = lane.GetTransferStation(otherLane);
                if (trStation != null && !lane.Equals(otherLane) && !otherLane.Equals(previousLane))
                {
                    transferStations[j++] = new Transfer(trStation, otherLane);
                }
            }

            return(transferStations);
        }
示例#2
0
 public Route(string startingStation, MetroLane lane)
 {
     from      = lane.GetFormalName(startingStation);
     this.lane = lane;
     isFirst   = true;
 }
示例#3
0
 public Route(MetroLane lane, string transferStation, MetroLane currentLane)
 {
     this.lane    = lane;
     from         = transferStation;
     previousLane = currentLane;
 }
示例#4
0
 public Transfer(string trStation, MetroLane lane)
 {
     station = trStation;
     to      = lane;
 }