From c058aeaddef7a8ea0aa4fb5d6022744c803bc1da Mon Sep 17 00:00:00 2001 From: Arne Keller Date: Wed, 11 Mar 2020 10:55:06 +0100 Subject: [PATCH] Change list-resources order --- game1_output.txt | 64 +++++++++---------- shack_test_output.txt | 6 +- .../informatik/ui/command/ListResources.java | 2 +- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/game1_output.txt b/game1_output.txt index e0a44d0..e2599cc 100644 --- a/game1_output.txt +++ b/game1_output.txt @@ -49,38 +49,6 @@ 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 @@ -97,6 +65,38 @@ wood wood wood wood +plastic +plastic +plastic +plastic +plastic +plastic +plastic +plastic +plastic +plastic +plastic +plastic +plastic +plastic +plastic +plastic +metal +metal +metal +metal +metal +metal +metal +metal +metal +metal +metal +metal +metal +metal +metal +metal axe club fireplace diff --git a/shack_test_output.txt b/shack_test_output.txt index 5612204..0d2964b 100644 --- a/shack_test_output.txt +++ b/shack_test_output.txt @@ -5,12 +5,12 @@ plastic wood metal plastic -plastic -metal wood -plastic metal +plastic wood +metal +plastic EMPTY shack OK diff --git a/src/edu/kit/informatik/ui/command/ListResources.java b/src/edu/kit/informatik/ui/command/ListResources.java index 14dfc3d..315644a 100644 --- a/src/edu/kit/informatik/ui/command/ListResources.java +++ b/src/edu/kit/informatik/ui/command/ListResources.java @@ -17,7 +17,7 @@ public final class ListResources extends Command { if (resources.isEmpty()) { Terminal.printLine("EMPTY"); } else { - resources.descendingIterator().forEachRemaining(Terminal::printLine); + resources.forEach(Terminal::printLine); } }