"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Graph_1 = require("../Class/Graph");
const boot_1 = require("../client/platform/node/boot");
const fromId_1 = require("../spec/fromId");
const _classes_1 = require("../system/_classes");
const _components_1 = require("../system/_components");
const _specs_1 = require("../system/_specs");
const clone_1 = require("../util/clone");
const [system] = (0, boot_1.boot)((0, clone_1.clone)({
    specs: _specs_1.default,
    classes: _classes_1.default,
    components: _components_1.default,
}));
const spec = system.emptySpec();
const graph = new Graph_1.Graph(spec, {}, system);
for (const id in system.specs) {
    const unit = (0, fromId_1.unitFromId)(system, id, system.specs, system.classes);
    let unitId;
    do {
        unitId = `${Math.random()}`;
    } while (graph.hasUnit(unitId));
    graph.addUnit(unitId, unit);
}
//# sourceMappingURL=instance.js.map