Inventory logic

I've some trouble with the inventory logic. I think the part within
platformer.py could work. But I've no idea how to design the part in
inventory.py. Any idea?