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 tiger
thunderstorm thunderstorm
list-resources list-resources
list-buildings
draw draw
draw draw
draw draw
@ -116,4 +117,6 @@ list-resources
build? build?
build steamboat build steamboat
build fireplace build fireplace
build axe
list-buildings
build steamboat build steamboat

View File

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

View File

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