@ludw1gj/maze-generation
Version:
Maze generation algorithms.
19 lines (18 loc) • 562 B
TypeScript
import { Cell, Position } from "./cell";
import { Direction } from "./direction";
export declare class Grid {
private readonly cells;
private readonly _height;
private readonly _width;
constructor(height: number, width: number);
readonly height: number;
readonly width: number;
getCell(pos: Position): Cell | undefined;
exportCells(): Cell[][];
getUnvisitedNeighbours(cell: Cell): Array<{
neighbourCell: Cell;
dir: Direction;
}>;
private isPositionValid;
static getRandomElement<T>(arr: T[]): T;
}