@logic-pad/core
Version:
34 lines (33 loc) • 1.28 kB
TypeScript
import { AnyConfig } from '../config.js';
import GridData from '../grid.js';
import { Color, RuleState } from '../primitives.js';
import { Shape } from '../shapes.js';
import RegionShapeRule from './regionShapeRule.js';
import { SearchVariant } from './rule.js';
export default class ContainsShapeRule extends RegionShapeRule {
private static readonly EXAMPLE_GRID_LIGHT;
private static readonly EXAMPLE_GRID_DARK;
private static readonly CONFIGS;
private static readonly SEARCH_VARIANTS;
readonly pattern: GridData;
readonly cache: Shape[];
/**
* **All <color> areas must contain this pattern**
*
* @param color - The color of the regions to compare.
* @param pattern - GridData representing the required pattern. Only non-gray tiles are considered.
*/
constructor(color: Color, pattern: GridData);
get id(): string;
get explanation(): string;
get configs(): readonly AnyConfig[] | null;
createExampleGrid(): GridData;
get searchVariants(): SearchVariant[];
validateGrid(grid: GridData): RuleState;
copyWith({ color, pattern, }: {
color?: Color;
pattern?: GridData;
}): this;
withPattern(pattern: GridData): this;
}
export declare const instance: ContainsShapeRule;