@logic-pad/core
Version:
30 lines (29 loc) • 1.05 kB
TypeScript
import { AnyConfig } from '../config.js';
import GridData from '../grid.js';
import { Color, RuleState } from '../primitives.js';
import Rule, { SearchVariant } from './rule.js';
export default class CellCountPerZoneRule extends Rule {
readonly color: Color;
private static readonly CONFIGS;
private static readonly EXAMPLE_GRID_LIGHT;
private static readonly EXAMPLE_GRID_DARK;
private static readonly EXAMPLE_GRID_GRAY;
private static readonly SEARCH_VARIANTS;
/**
* **Zones of the same size have the same number of <color> cells.**
*
* @param color - The color of the cells to count.
*/
constructor(color: Color);
get id(): string;
get explanation(): string;
get configs(): readonly AnyConfig[] | null;
createExampleGrid(): GridData;
get searchVariants(): SearchVariant[];
validateGrid(grid: GridData): RuleState;
copyWith({ color }: {
color?: Color;
}): this;
withColor(color: Color): this;
}
export declare const instance: CellCountPerZoneRule;