private static void BoatReady(TimeTableEntry timetable, PortModel destination, FerryJourney ferryJourney)
        {
            if (ferryJourney.Ferry == null)
                FerryManager.AddFerry(timetable, ferryJourney);

            var ferry = ferryJourney.Ferry;

            var time = FerryModule.TimeReady(timetable, destination);
            destination.AddBoat(time, ferry);
        }
        public static FerryJourney CreateFerryJourney(List<PortModel> ports, TimeTableEntry timetable)
        {
            if (ports == null)
                return null;

            if (timetable == null)
                return null;

            var fj = new FerryJourney
            {
                Origin = ports.Single(x => x.Id == timetable.OriginId),
                Destination = ports.Single(x => x.Id == timetable.DestinationId)
            };
            return fj;
        }
        public static FerryJourney CreateFerryJourney(List <PortModel> ports, TimeTableEntry timetable)
        {
            if (ports == null)
            {
                return(null);
            }

            if (timetable == null)
            {
                return(null);
            }

            var fj = new FerryJourney
            {
                Origin      = ports.Single(x => x.Id == timetable.OriginId),
                Destination = ports.Single(x => x.Id == timetable.DestinationId)
            };

            return(fj);
        }
示例#4
0
        private static void BoatReady(TimeTableEntry timetable, PortModel destination, FerryJourney ferryJourney)
        {
            if (ferryJourney.Ferry == null)
            {
                FerryManager.AddFerry(timetable, ferryJourney);
            }

            var ferry = ferryJourney.Ferry;

            var time = FerryModule.TimeReady(timetable, destination);

            destination.AddBoat(time, ferry);
        }
 public static void AddFerry(TimeTableEntry timetable, FerryJourney journey)
 {
     journey.Ferry = journey.Origin.GetNextAvailable(timetable.Time);
 }
 public static void AddFerry(TimeTableEntry timetable, FerryJourney journey)
 {
     journey.Ferry = journey.Origin.GetNextAvailable(timetable.Time);
 }