The exit of each level stays closed until enough emeralds have been
collected by the player. Some levels also require some special switches
(light bulbs, for example) to be activated before it opens.
