UNPKG

@logic-pad/core

Version:
41 lines (40 loc) 1.47 kB
import { AnyConfig } from '../config.js'; import { SymbolMergeHandler } from '../events/onSymbolMerge.js'; import GridData from '../grid.js'; import NumberSymbol from './numberSymbol.js'; import Symbol from './symbol.js'; export default class FocusSymbol extends NumberSymbol implements SymbolMergeHandler { readonly deadEnd: boolean; get title(): string; private static readonly CONFIGS; private static readonly EXAMPLE_GRID; private static readonly EXAMPLE_GRID_DEAD_END; /** * **Focus Numbers count directly adjacent cells of the same color** * @param x - The x-coordinate of the symbol. * @param y - The y-coordinate of the symbol. * @param deadEnd - Whether this Focus Number is a Dead End. * @param number - The focus number. */ constructor(x: number, y: number, deadEnd: boolean, number: number); get id(): string; get placementStep(): number; get explanation(): string; get configs(): readonly AnyConfig[] | null; createExampleGrid(): GridData; private countForColor; countTiles(grid: GridData): { completed: number; possible: number; }; descriptionEquals(other: Symbol): boolean; copyWith({ x, y, deadEnd, number, }: { x?: number; y?: number; deadEnd?: boolean; number?: number; }): this; withNumber(number: number): this; withDeadEnd(deadEnd: boolean): this; } export declare const instance: FocusSymbol;