示例#1
0
        public void AcceptRide(Ride ride)
        {
            InMemoryRideDataBase.SaveRide(ride);
            Taxis.FirstOrDefault(x => x.TaxiDriverId == ride.TaxiDriverId).Location = ride.LocationTo;

            Console.WriteLine("Ride accepted, waiting for driver: " + ride.TaxiDriverName);
        }
示例#2
0
        public void AcceptRide(Ride ride)
        {
            InMemoryRideDataBase.SaveRide(ride);

            ride.Vehicle.UpdateLocation(ride.LocationTo);

            Console.WriteLine(string.Format("Ride accepted, waiting for driver: {0}", ride.Vehicle.DriverName));
        }
示例#3
0
        public void AcceptRide(Ride ride)
        {
            InMemoryRideDataBase.SaveRide(ride);

            ride.Taxi.Location = ride.LocationTo;

            Console.WriteLine("Ride accepted, waiting for driver: " + ride.Taxi.Driver.Name);
        }
示例#4
0
        private void AcceptRide(Ride ride)
        {
            InMemoryRideDataBase.SaveRide(ride);

            ride.TaxiInfo.CurrentLocation = ride.EndLocation;

            Console.WriteLine("Ride accepted, waiting for driver: " + ride.TaxiInfo.DriverName);
            Console.WriteLine("");
        }
示例#5
0
        public void AcceptRide(Ride ride)
        {
            InMemoryRideDataBase.SaveRide(ride);
            foreach (Taxi taxi in TaxisList)
            {
                if (taxi.Driver.Id == ride.Driver.Id)
                {
                    taxi.Location = ride.EndLocation;
                }
            }

            Console.WriteLine("Ride accepted, waiting for driver: " + ride.Driver.Name);
        }