@logic-pad/core
Version:
26 lines (25 loc) • 1.06 kB
TypeScript
import { SymbolMergeHandler } from '../events/onSymbolMerge.js';
import GridData from '../grid.js';
import { State } from '../primitives.js';
import Symbol from './symbol.js';
export default abstract class CustomSymbol extends Symbol implements SymbolMergeHandler {
readonly description: string;
readonly grid: GridData;
/**
* **A custom symbol**
*
* @param description - The description of the symbol. Leave this empty to hide the description.
* @param grid - The thumbnail grid of the rule, preferably 5x4 in size.
* @param x - The x-coordinate of the symbol.
* @param y - The y-coordinate of the symbol.
*/
constructor(description: string, grid: GridData, x: number, y: number);
get explanation(): string;
createExampleGrid(): GridData;
validateSymbol(_grid: GridData): State;
get validateWithSolution(): boolean;
descriptionEquals(other: Symbol): boolean;
withDescription(description: string): this;
withGrid(grid: GridData): this;
}
export declare const instance: undefined;