In the initialization section, you'll notice that the item is always drawn on screen even if it is not supposed to be there. There is an easy way around this - and that is to test if the item is in the room before drawing it. Just replace this line from the initialization section: