UNPKG

@logic-pad/core

Version:
35 lines (34 loc) 1.43 kB
import { AnyConfig } from '../config.js'; import GridData from '../grid.js'; import { OrientationToggle, State } from '../primitives.js'; import MultiEntrySymbol from './multiEntrySymbol.js'; export default class MyopiaSymbol extends MultiEntrySymbol { readonly diagonals: boolean; readonly directions: OrientationToggle; 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; 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;