Column, then row. The matrix itself is indexed matrix[row][column].
matrix[row][column]
import type { Coord } from "@tamb/gamegrid/npc";const matrix = [[{ type: "wall" }, { type: "floor" }]];const here: Coord = [1, 0];matrix[here[1]][here[0]].type; // "floor". The matrix index is row, then column. Copy
import type { Coord } from "@tamb/gamegrid/npc";const matrix = [[{ type: "wall" }, { type: "floor" }]];const here: Coord = [1, 0];matrix[here[1]][here[0]].type; // "floor". The matrix index is row, then column.
Column, then row. The matrix itself is indexed
matrix[row][column].