Reset all time members of vehicle:

- Reset (nullify) all times
   when a new route is set.

   Fixes a bug where there is a trip
   time when in second day and still
   has not arrived.
This commit is contained in:
HeshamTB 2020-12-03 02:58:54 +03:00
parent 024babaf3f
commit 8bb64bea64
Signed by: Hesham
GPG Key ID: 74876157D199B09E

View File

@ -115,6 +115,9 @@ public abstract class Vehicle {
this.route = route;
this.arrivedToDest = false;
this.routeTimeHistory.clear();
this.timeStartedOnCurrentStreet = null;
this.timeStartedMoving = null;
this.timeOfArrival = null;
}
private void setVehicleSize(double vehicleSize) {