increpare/PuzzleScript

synonymsDict.hasOwnProperty(n)) section a bit mysterious

increpare opened this issue · 0 comments

What does this section do? How to trigger it?

delete synonymsDict[n];

    var modified = true;
    while (modified) {
        modified = false;
        for (var n in synonymsDict) {
            if (synonymsDict.hasOwnProperty(n)) {
                var value = synonymsDict[n];
                if (value in propertiesDict) {
                    delete synonymsDict[n];
                    propertiesDict[n] = propertiesDict[value];
                    modified = true;
                } else if (value in aggregatesDict) {
                    delete aggregatesDict[n];
                    aggregatesDict[n] = aggregatesDict[value];
                    modified = true;
                } else if (value in synonymsDict) {
                    synonymsDict[n] = synonymsDict[value];
                }
            }
        }

ditto for the aggregate section after (which is at least partially covered by the "Cannot define an aggregate in terms of properties" test)