Browse Source

refactoring: loadPartofItems()

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

1
src/main/java/org/bitbiome/commands/ShopCommand.java

@ -19,7 +19,6 @@ public class ShopCommand implements CommandAPI{
while (true){
String input = scanner.nextLine();
if(validInput(input)){
if(input.equals("1")){
//shop.buy();

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

@ -16,7 +16,7 @@ public class Shop {
public Shop(){
allItems = loadItems();
currentShopItems = itemRotation(allItems, 2);
currentShopItems = loadPartofItems(allItems, 2);
}
public boolean buy(){
@ -44,7 +44,7 @@ public class Shop {
return arrayList;
}
public ArrayList itemRotation(ArrayList<Item> alleItems, int itemCount){
public ArrayList loadPartofItems(ArrayList<Item> alleItems, int itemCount){
ArrayList arrayList = new ArrayList<Item>();
HashSet<Integer> hashSet = new HashSet<>();
Random random = new Random();

Loading…
Cancel
Save