Implementation of visitor pattern
<p>We implemented a Inventory for in a game as a school assignment. The inventory is implemented using an ArrayList which contain items. There are different types of items: Grenades, RocketLaunchers, etc.</p>

<p>We need to be able to store every item in an arraylist. However, some items have constraints ( e.g. there can only be 6 grenades in the inventory.)</p>

<p>We aren't allowed to use instanceof. So we implemented a visitor pattern which adds the grenade to our Inventory and we used a different list for grenades than for the other items. During the evaluation of the assignment we were told we should store every item in the same list. We aren't allowed to keep count of the grenades inside the inventory. We should count the number of grenades before we try to add a grenade to the inventory. But we have no idea how to achieve this.</p>
