Added player, collectGold, collectKey, openDoor and collide functions