UNPKG

@logic-pad/core

Version:
38 lines (37 loc) 1.59 kB
import { AnyConfig } from '../config.js'; import { SymbolMergeHandler } from '../events/onSymbolMerge.js'; import GridData from '../grid.js'; import { OrientationToggle, State } from '../primitives.js'; import Symbol from './symbol.js'; export default class MyopiaSymbol extends Symbol implements SymbolMergeHandler { readonly diagonals: boolean; readonly directions: OrientationToggle; get title(): "Framed Myopia Arrow" | "Myopia Arrow"; private static readonly CONFIGS; private static readonly EXAMPLE_GRID; private static readonly EXAMPLE_DIAGONAL_GRID; /** * **Viewpoint Numbers count visible cells in the four directions** * @param x - The x-coordinate of the symbol. * @param y - The y-coordinate of the symbol. * @param diagonals - Whether the symbol should consider diagonal directions. * @param directions - The directions in which an arrow is pointing. */ constructor(x: number, y: number, diagonals: boolean, directions: OrientationToggle); get id(): string; get placementStep(): number; get explanation(): string; get configs(): readonly AnyConfig[] | null; createExampleGrid(): GridData; validateSymbol(grid: GridData): State; descriptionEquals(other: Symbol): boolean; copyWith({ x, y, diagonals, directions, }: { x?: number; y?: number; diagonals?: boolean; directions?: OrientationToggle; }): this; withDirections(directions: OrientationToggle): this; withDiagonals(diagonals: boolean): this; } export declare const instance: MyopiaSymbol;