Inventory - Laschion/Escape- GitHub Wiki
Inventory
Inventory will be stored in arrays that have a set amount of space for items. Weight will not be an effect in this game for items so just about the number of slots in your inventory. So
[ _ _ _ _ ] would be players inventory and if you picked up a sword it would become
[ S _ _ _ ], where S represents the sword in the first slot. With the addition of bags however the bags will be their own array that can be put into the inventory array. The bags will also have a set amount of spots however they only count as one slot within the inventory so it would look something like this
[ _ _ [] _ ]
Within a bag you could put in the sword however you will have to specify that you want to put the item within the bag So [ S _ [] _ ] Can become [ _ _ [S] _ ] after the user says to put the sword in the bag. This configuration only uses one inventory slot instead of two