@tamb/gamegrid
    Preparing search index...

    Interface IMoveEventDetail

    Extra detail keys on gridEventsEnum MOVE_* events (and wrap / boundary events from the same attempt).

    • from is the active cell before the attempt.
    • to is the candidate cell after wrap / clamp — the tile the attempt tried to occupy. On a successful land this matches IState.activeCoords. On a block it is the rejected cell (active coords stay at from). On a finite-edge bump to equals from.
    • blocked is true only when IOptions.blockOnType / IOptions.moveOnType rejected the candidate.
    target.addEventListener(gridEventsEnum.MOVE_BLOCKED, (e: GameGridDOMEvent) => {
    const { from, to, direction, blocked } = e.detail;
    console.log(`blocked ${direction} ${from}${to}`, blocked);
    });
    interface IMoveEventDetail {
        blocked: boolean;
        direction?: string;
        from: number[];
        to: number[];
        [key: string]: unknown;
    }

    Indexable

    • [key: string]: unknown
    Index
    blocked: boolean
    direction?: string
    from: number[]
    to: number[]