Revert capacity()
This commit is contained in:
parent
8bb64bea64
commit
787d2a7fd7
@ -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() {
|
||||||
|
Loading…
Reference in New Issue
Block a user