- Home /
This post has been wikified, any user with enough reputation can edit it.
Question by
Rybo5000 · Sep 30, 2012 at 12:59 PM ·
javascripttextdictionary
Best Way to Represent an Inventory?
I'm making a simple text game and want to represent an inventory.
I'm using a Dictionary at the moment like this:
var inventory : Dictionary,String, int>
inventory.Add("Potion",1);
But I'm not sure if this is the best way? Can I change the number to represent change in quantity? Such as
inventory.Add("Potion",-1); ?
Comment