UNPKG

@logic-pad/core

Version:
20 lines (19 loc) 587 B
import RegionShapeBTModule from './regionShape.js'; export default class UniqueShapeBTModule extends RegionShapeBTModule { constructor(instr) { super(instr); Object.defineProperty(this, "instr", { enumerable: true, configurable: true, writable: true, value: void 0 }); this.instr = instr; } checkGlobal(grid) { const regions = this.getShapeRegions(grid); return regions.every(r => r.count === 1) ? { tilesNeedCheck: null, ratings: null } : false; } }