I have this array
public static ArrayList<String> inventory = new ArrayList<String>();
and have the players items stored inside of it.
I want to add a feature in the shop class that will sell everything but the pickaxe, how can I create a loop to check if theres something in the array other than "pickaxe" and if there is to remove it?
To remove I have a void
public void removeAllInventory() {
inventory.clear();
}
or
public void removeInventory(String item) {
inventory.remove(item);
}
Could I just edit the removeAllInventory to ignore the pickaxe and make a new void called removeAllShop or something? If so what would go in that void?
This is where I need to put it in:
else if (input.input.equalsIgnoreCase("all")) {
}