@tamb/gamegrid
    Preparing search index...

    Interface SeekerStepArgs

    Inputs for chooseSeekerStep. The same memory object is passed again on the next tick.

    import { createNpcMemory, type SeekerStepArgs } from "@tamb/gamegrid/npc";

    const args: SeekerStepArgs = {
    matrix,
    isWalkable,
    self: [1, 1],
    visibleQuarry: [{ id: "hider", coord: [4, 1] }],
    isQuarryActive: () => true,
    memory: createNpcMemory(),
    difficulty: "smart",
    };
    import { createNpcMemory, type SeekerStepArgs } from "@tamb/gamegrid/npc";

    const args: SeekerStepArgs = {
    matrix,
    isWalkable,
    self: [2, 1],
    visibleQuarry: [{ id: "hider", coord: [2, 1] }],
    isQuarryActive: () => true,
    lures: [[4, 1]],
    memory: createNpcMemory(),
    difficulty: "smart",
    pauseOnOverlapMs: 500,
    now: 1000,
    };
    interface SeekerStepArgs {
        difficulty: Difficulty;
        isQuarryActive: (id: string | null, coord: Coord) => boolean;
        isWalkable: IsWalkable;
        legal?: Direction[];
        lures?: Coord[];
        matrix: Cell[][];
        memory: NpcMemory;
        now?: number;
        pauseOnOverlapMs?: number;
        rng?: () => number;
        self: Coord;
        visibleQuarry: { coord: Coord; id: string }[];
    }
    Index
    difficulty: Difficulty
    isQuarryActive: (id: string | null, coord: Coord) => boolean

    False forgets a stored sighting. id is null when the sighting has a cell but the caller never had an id for it.

    isWalkable: IsWalkable
    legal?: Direction[]

    Directions the caller will accept. Omit for every open neighbor.

    lures?: Coord[]

    Cells to investigate before the last sighting. Omit when the game has none.

    matrix: Cell[][]
    memory: NpcMemory
    now?: number

    Clock reading, in milliseconds, for SeekerStepArgs.pauseOnOverlapMs. Defaults to Date.now().

    pauseOnOverlapMs?: number

    Milliseconds to wait before the next move when this seeker is standing on a visible quarry. Omit or pass 0 to move on immediately.

    rng?: () => number
    self: Coord
    visibleQuarry: { coord: Coord; id: string }[]

    Quarry the caller already decided this seeker can see, closest-search order.