From f32fa1704ffac6a6eac939af7bf6f2758d2fb476 Mon Sep 17 00:00:00 2001 From: Max Gerbeth Date: Wed, 11 Jan 2023 10:17:47 +0100 Subject: [PATCH] implementing itemRotation() --- src/main/java/org/bitbiome/shop/Shop.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/bitbiome/shop/Shop.java b/src/main/java/org/bitbiome/shop/Shop.java index ba1f00b..6e9fe3b 100644 --- a/src/main/java/org/bitbiome/shop/Shop.java +++ b/src/main/java/org/bitbiome/shop/Shop.java @@ -44,7 +44,7 @@ public class Shop { return arrayList; } - public ArrayList loadPartofItems(ArrayList alleItems, int itemCount){ + private ArrayList loadPartofItems(ArrayList alleItems, int itemCount){ ArrayList arrayList = new ArrayList(); HashSet hashSet = new HashSet<>(); Random random = new Random(); @@ -58,6 +58,10 @@ public class Shop { return arrayList; } + public void itemRotation(){ + currentShopItems = loadPartofItems(allItems, 2); + } + public void printCurrentShopItems(){ printArrayList(currentShopItems); }