Compare commits

...

2 Commits

Author SHA1 Message Date
106d1bea07
Merge branch 'master' into master-color 2020-11-30 18:27:36 +03:00
e8e45cb59e
implement color output 2020-11-27 04:55:12 +03:00

View File

@ -471,12 +471,12 @@ public class MakkahCity {
"*********| District | Average Arrival | Avg. time\n";
StringBuilder report = new StringBuilder();
report.append(String.format(headerFormat, currenttimeManager.getCurrentTime(), status));
String streetFormat = "%-18s | %%%-8s | %5d | %5d | %14d | %-9s";
String streetFormat = "%-27s | %%%-8s | %5d | %5d | %14d | %-9s";
String districtForamt = " | %-9s | %%%-14d | %s";
for (int i = 0; i < stdStreet.length; i++) {
int cap = stdStreet[i].getPercentRemainingCapacity();
report.append(String.format(streetFormat,
stdStreet[i].getName().name(),
getColoredStreetName(stdStreet[i], cap),
cap,
stdStreet[i].getVehicles().size(),
stdStreet[i].getNumberOfBuses(),