Jump to content

Items in bank


Jammer

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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