Amend prev commit about checks
This commit is contained in:
parent
200c06bfac
commit
20cfeb268c
@ -457,10 +457,7 @@ public class MakkahCity {
|
|||||||
if (!vehicle.isArrivedToDest()) {
|
if (!vehicle.isArrivedToDest()) {
|
||||||
double factor = 1-(vehicle.getCurrentStreet().capcityPoint(vehicle.getCurrentLocation(),
|
double factor = 1-(vehicle.getCurrentStreet().capcityPoint(vehicle.getCurrentLocation(),
|
||||||
vehicle.getCurrentLocation()+1000,vehicle)) ;
|
vehicle.getCurrentLocation()+1000,vehicle)) ;
|
||||||
if (vehicle instanceof Bus) vehicle.move(Bus.MAX_FORWARD * factor );
|
vehicle.move(vehicle.getMaxSpeed()*factor);
|
||||||
else if (vehicle instanceof Sedan) vehicle.move(Sedan.MAX_FORWARD * factor );
|
|
||||||
else if (vehicle instanceof SUV) vehicle.move(SUV.MAX_FORWARD * factor );
|
|
||||||
else if (vehicle instanceof Truck) vehicle.move(Bus.MAX_FORWARD * factor );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user