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
tiger tiger
thunderstorm thunderstorm
list-resources
draw draw
draw draw
draw draw
@ -111,6 +112,7 @@ draw
draw draw
draw draw
draw draw
list-resources
build? build?
build steamboat build steamboat
build fireplace build fireplace

View File

@ -1,4 +1,5 @@
OK OK
EMPTY
wood wood
wood 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
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 axe
ballon ballon
club club

View File

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