Add Buses per District in pre run report
This commit is contained in:
parent
9d195a8864
commit
b214b279db
@ -600,6 +600,7 @@ public class MakkahCity {
|
||||
report.append(String.format("%-9s|",campPerDistrict[i].get(0).getHotelDistrict().name()));
|
||||
|
||||
report.append(String.format(" %-10d|",campPerDistrict[i].size()));
|
||||
report.append(String.format(" %-7d|", busesInDistrict(District.values()[i])));
|
||||
//Calc values per dist here.
|
||||
|
||||
report.append("\n");
|
||||
@ -625,6 +626,14 @@ public class MakkahCity {
|
||||
return String.format("%02d:%02d", hours, minutes);
|
||||
}
|
||||
|
||||
private static int busesInDistrict(District district){
|
||||
int buses = 0;
|
||||
for (Campaign campaign : campPerDistrict[district.ordinal()]){
|
||||
buses += campaign.getNumberOfBusses();
|
||||
}
|
||||
return buses;
|
||||
}
|
||||
|
||||
public static final String ANSI_RESET = "\u001B[0m";
|
||||
public static final String ANSI_BLACK = "\u001B[30m";
|
||||
public static final String ANSI_RED = "\u001B[31m";
|
||||
|
Loading…
Reference in New Issue
Block a user