public void writeVariables(DataOutputStream stream) throws Exception {
        stream.writeBoolean(sound);
        stream.writeInt(lastLevel);
        for(int i = 0; i < 5; i++){
            stream.writeInt(bestCombo[i]);
            stream.writeInt(savedAnimals[i]);
            stream.writeInt(highscore[i]);
        }
        stream.writeInt(money);
        
        stream.writeBoolean(ItemDatabase.ALAT_MASAK.isBought());
        stream.writeBoolean(ItemDatabase.TONGKAT.isBought());
        stream.writeBoolean(ItemDatabase.TALI.isBought());
        stream.writeBoolean(ItemDatabase.HASDUK.isBought());
        stream.writeBoolean(ItemDatabase.RING.isBought());
        stream.writeBoolean(ItemDatabase.BADGE.isBought());
        
        stream.writeBoolean(ItemDatabase.ALAT_MASAK.isEquipped());
        stream.writeBoolean(ItemDatabase.TONGKAT.isEquipped());
        stream.writeBoolean(ItemDatabase.TALI.isEquipped());
        stream.writeBoolean(ItemDatabase.HASDUK.isEquipped());
        stream.writeBoolean(ItemDatabase.RING.isEquipped());
        stream.writeBoolean(ItemDatabase.BADGE.isEquipped());
        
    }