The code for the PlayerInventory class is not working. When a user starts a new account, PlayerInventory is initialized with basic items. It should also be possible to add and drop items from the inventory, with duplicate items added and removed separately.
For example, if "lumber" was added to the inventory and "stone" was removed, getItems() should return a Vector containing "lumber", "magic potion", and "lumber", in any order.
Fix the bugs.
- Example case: Wrong answer
- Duplicates added separately: Wrong answer
- Duplicates removed separately: Wrong answer
- Unique items are added and removed: Wrong answer