Street capacity used instead of remaining.

Signed-off-by: HeshamTB <hishaminv@gmail.com>
This commit is contained in:
HeshamTB 2020-11-18 19:28:38 +03:00
parent 9ecbfe15ed
commit 11a9269cb4

View File

@ -72,7 +72,7 @@ public class Street {
}
public int getPercentRemainingCapacity() {
return (int) (capcity()/(this.length*this.numberOfLanes)*100);
return (int) (100 - (capcity()/(this.length*this.numberOfLanes)*100));
}
public boolean canTakeVehicles( Vehicle vehicle ) {