Correct list-resources ordering

This commit is contained in:
Arne Keller 2020-02-28 09:53:21 +01:00
parent bffdf9112c
commit d51e6a4dae
3 changed files with 52 additions and 1 deletions

View File

@ -63,6 +63,7 @@ tiger
tiger
tiger
thunderstorm
list-resources
draw
draw
draw
@ -111,6 +112,7 @@ draw
draw
draw
draw
list-resources
build?
build steamboat
build fireplace

View File

@ -1,4 +1,5 @@
OK
EMPTY
wood
wood
wood
@ -47,6 +48,54 @@ metal
metal
metal
metal
metal
metal
metal
metal
metal
metal
metal
metal
metal
metal
metal
metal
metal
metal
metal
metal
plastic
plastic
plastic
plastic
plastic
plastic
plastic
plastic
plastic
plastic
plastic
plastic
plastic
plastic
plastic
plastic
wood
wood
wood
wood
wood
wood
wood
wood
wood
wood
wood
wood
wood
wood
wood
wood
axe
ballon
club

View File

@ -16,7 +16,7 @@ public class ListResources extends Command {
if (resources.isEmpty()) {
Terminal.printLine("EMPTY");
} else {
resources.forEach(Terminal::printLine);
resources.descendingIterator().forEachRemaining(Terminal::printLine);
}
}