@logic-pad/core
Version:
19 lines (18 loc) • 610 B
TypeScript
import GridData from '../grid.js';
import { Mode, RuleState } from '../primitives.js';
import Instruction from '../instruction.js';
export interface SearchVariant {
description: string;
rule: Rule;
}
export default abstract class Rule extends Instruction {
abstract validateGrid(grid: GridData): RuleState;
abstract get searchVariants(): SearchVariant[];
searchVariant(): SearchVariant;
modeVariant(_mode: Mode): Rule | null;
/**
* Whether only one instance of this rule is allowed in a grid.
*/
get isSingleton(): boolean;
}
export declare const instance: undefined;