Browse Source

refactoring: printArrayList() in Shop.java

remotes/origin/shop
Max Gerbeth 2 years ago
parent
commit
4a8ebd9166
  1. 2
      src/main/java/org/bitbiome/shop/Shop.java

2
src/main/java/org/bitbiome/shop/Shop.java

@ -58,8 +58,10 @@ public class Shop {
private void printArrayList(ArrayList<Item> arrayList){ private void printArrayList(ArrayList<Item> arrayList){
System.out.println(""); System.out.println("");
for(int i = 0; i < arrayList.size(); i++){ for(int i = 0; i < arrayList.size(); i++){
if(arrayList.get(i).getAmount() != 0) {
System.out.println(arrayList.get(i).getName() + " | Anzahl: " + arrayList.get(i).getAmount() + " | Kosten: " + arrayList.get(i).getGold()); System.out.println(arrayList.get(i).getName() + " | Anzahl: " + arrayList.get(i).getAmount() + " | Kosten: " + arrayList.get(i).getGold());
} }
}
System.out.println(""); System.out.println("");
} }
} }
Loading…
Cancel
Save