Correct list-buildings order

This commit is contained in:
Arne Keller 2020-02-28 11:56:17 +01:00
parent 5cec0064f7
commit f240ecf5f0
3 changed files with 10 additions and 1 deletions

View File

@ -64,6 +64,7 @@ tiger
tiger
thunderstorm
list-resources
list-buildings
draw
draw
draw
@ -116,4 +117,6 @@ list-resources
build?
build steamboat
build fireplace
build axe
list-buildings
build steamboat

View File

@ -1,5 +1,6 @@
OK
EMPTY
EMPTY
wood
wood
wood
@ -107,3 +108,6 @@ steamboat
Error, need fireplace to build
OK
OK
axe
fireplace
OK

View File

@ -16,7 +16,9 @@ public class ListBuildings extends Command {
if (items.isEmpty()) {
Terminal.printLine("EMPTY");
} else {
items.forEach(Terminal::printLine);
for (int i = items.size() - 1; i >= 0; i--) {
Terminal.printLine(items.get(i));
}
}
}