UNPKG

@woosh/meep-engine

Version:

Pure JavaScript game engine. Fully featured and production ready.

40 lines (30 loc) 539 B
export class OptionAbstract { /** * * @type {OptionGroup|null} */ parent = null; /** * * @param {string} id */ constructor(id) { /** * * @type {string} */ this.id = id; } /** * @returns {string[]} */ computePath() { const r = []; let n = this; while (n !== null) { r.unshift(n.id); n = n.parent; } return r; } }