Whether a cell can be entered. Out-of-range coordinates must return false.
Board the coordinate is read from.
Column.
Row.
True when a step may land on that cell.
import { walkableUnlessTypes } from "@tamb/gamegrid/npc";const isWalkable = walkableUnlessTypes(["wall", "water"]); Copy
import { walkableUnlessTypes } from "@tamb/gamegrid/npc";const isWalkable = walkableUnlessTypes(["wall", "water"]);
import type { IsWalkable } from "@tamb/gamegrid/npc";const isWalkable: IsWalkable = (matrix, x, y) => matrix[y]?.[x]?.type === "floor"; Copy
import type { IsWalkable } from "@tamb/gamegrid/npc";const isWalkable: IsWalkable = (matrix, x, y) => matrix[y]?.[x]?.type === "floor";
Whether a cell can be entered. Out-of-range coordinates must return false.