@logic-pad/core
Version:
34 lines (33 loc) • 1.26 kB
TypeScript
import { AnyConfig } from '../config.js';
import GridData from '../grid.js';
import { Color, RuleState } from '../primitives.js';
import CellCountPerZoneRule from './cellCountPerZoneRule.js';
import { SearchVariant } from './rule.js';
export default class ExactCountPerZoneRule extends CellCountPerZoneRule {
readonly color: Color;
readonly count: number;
readonly title = "Exact Count Per Zone";
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;
/**
* **Each zone has <count> <color> cells.**
*
* @param color - The color of the cells to count.
* @param count - The exact count of the cells in each zone.
*/
constructor(color: Color, count: number);
get id(): string;
get explanation(): string;
get configs(): readonly AnyConfig[] | null;
createExampleGrid(): GridData;
get searchVariants(): SearchVariant[];
validateGrid(grid: GridData): RuleState;
copyWith({ color, count }: {
color?: Color;
count?: number;
}): this;
}
export declare const instance: ExactCountPerZoneRule;