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); }
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)); }
public void AcceptRide(Ride ride) { InMemoryRideDataBase.SaveRide(ride); ride.Taxi.Location = ride.LocationTo; Console.WriteLine("Ride accepted, waiting for driver: " + ride.Taxi.Driver.Name); }
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(""); }
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); }