Exception in thread \"main\" java.util.ConcurrentModificationException
Squash the PC dirties the room Violet. The room\'s state is now dirty
Lily the animal growls
T
The only safe way to remove an element from an underlying collection and continue the iteration is to use the remove() method of the Iterator. This removes the last element returned by the next() method of the Iterator.
In your case, it appears that this would require passing the Iterator to the method that performs the modification (or make it an instance field, like the Map object is already).