Jump to content

Items in bank


Recommended Posts

Posted
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

Posted
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

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...