Added several improvements IX
This commit is contained in:
parent
0dc51a1b55
commit
1f1b680266
@ -179,9 +179,9 @@ public class Main {
|
||||
int spacesDone = (int) (percent * 52);
|
||||
int spacesTodo = spacesTotal - spacesDone;
|
||||
System.out.println(
|
||||
WALL + createSpaces(spacesDone) + " () " + createSpaces(spacesTodo) + WALL + (spacesTodo == 0 ? "*GO*" :"XXXX") + WALL + NEW_LINE +
|
||||
WALL + createSpaces(spacesDone) + "/||\\" + createSpaces(spacesTodo) + WALL + (spacesTodo == 0 ? "HOME" :"XXXX") + WALL + NEW_LINE +
|
||||
WALL + createSpaces(spacesDone) + " /\\ " + createSpaces(spacesTodo) + WALL + (spacesTodo == 0 ? "!!!!" :"XXXX") + WALL + NEW_LINE +
|
||||
WALL + createSpaces(spacesDone) + " () " + createOneZeroes(spacesTodo) + WALL + (spacesTodo == 0 ? "*GO*" :"XXXX") + WALL + NEW_LINE +
|
||||
WALL + createSpaces(spacesDone) + "/||\\" + createOneZeroes(spacesTodo) + WALL + (spacesTodo == 0 ? "HOME" :"XXXX") + WALL + NEW_LINE +
|
||||
WALL + createSpaces(spacesDone) + " /\\ " + createOneZeroes(spacesTodo) + WALL + (spacesTodo == 0 ? "!!!!" :"XXXX") + WALL + NEW_LINE +
|
||||
"=================================================================="
|
||||
);
|
||||
|
||||
@ -189,9 +189,19 @@ public class Main {
|
||||
|
||||
}
|
||||
private static final String createSpaces(int spaceCount) {
|
||||
return create(spaceCount, ' ');
|
||||
}
|
||||
private static final String create(int count, char ch) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for(int i = 1; i <= spaceCount; i++) {
|
||||
sb.append(" ");
|
||||
for(int i = 1; i <= count; i++) {
|
||||
sb.append(ch);
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
private static final String createOneZeroes(int count) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for(int i = 1; i <= count; i++) {
|
||||
sb.append(Math.random() > 0.5 ? "1" : "0");
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user