November 27, 20178 yr 2 hours ago, Jammer said: I think I was unclear. I meant that I store all the items in the bank in an arraylist and then I check if the best gear I can have is there. If it isn't I check if I have enough cash and if so, I buy it. Or maybe you meant something else? I'll try to change it into a hashmap since I'm gonna need it for stuff like food anyway. And btw, do you know of a smart way of assigning a price to every item in the hashmap? I understood you but an arraylist only allows you to check what your bank contains, you won't be able to get how many. For price you could probably have another map that stores prices and if it doesn't contain the key (being item name/id), use a price grabber and add it to the map
November 28, 20178 yr Author 7 hours ago, HeyImJamie said: I understood you but an arraylist only allows you to check what your bank contains, you won't be able to get how many. For price you could probably have another map that stores prices and if it doesn't contain the key (being item name/id), use a price grabber and add it to the map Alright thanks, I’ll try to implement that when I get home today.
Create an account or sign in to comment