@logic-pad/core
Version:
15 lines (14 loc) • 423 B
JavaScript
import RegionShapeBTModule from './regionShape.js';
export default class UniqueShapeBTModule extends RegionShapeBTModule {
instr;
constructor(instr) {
super(instr);
this.instr = instr;
}
checkGlobal(grid) {
const regions = this.getShapeRegions(grid);
return regions.every(r => r.count === 1)
? { tilesNeedCheck: null, ratings: null }
: false;
}
}