Revert capacity()

This commit is contained in:
HeshamTB 2020-12-03 03:19:25 +03:00
parent 8bb64bea64
commit 787d2a7fd7
Signed by: Hesham
GPG Key ID: 74876157D199B09E

View File

@ -69,18 +69,18 @@ public class Street implements Travelable {
for(int i=0;i<vehicles.size();i++) { for(int i=0;i<vehicles.size();i++) {
totalLenthofCar+=vehicles.get(i).getVehicleSize(); totalLenthofCar+=vehicles.get(i).getVehicleSize();
} }
// int percent = 0; int percent = 0;
// if (totalLenthofCar > totalLength){ if (totalLenthofCar > totalLength){
// percent = (int) (totalLength/totalLenthofCar); percent = (int) (totalLength/totalLenthofCar);
// percent *= 100; percent *= 100;
// percent += totalLength - (totalLength % totalLenthofCar); percent += totalLength - (totalLength % totalLenthofCar);
// } }
// else { else {
// percent = (int)(totalLength - totalLenthofCar); percent = (int)(totalLength - totalLenthofCar);
// } }
//
// return percent; return percent;
return totalLength - totalLenthofCar; //return totalLength - totalLenthofCar;
} }
public int getPercentRemainingCapacity() { public int getPercentRemainingCapacity() {