Newer
Older
rpg / apps / game / src / testing / maps.ts
import { TILES } from '../data/map';

/** Карта 10×10 травы с одной стеной (tall-объект) в центре — для LOS. */
export function mapWithWall(): {
    width: number;
    height: number;
    tiles: number[];
    tall: Record<number, unknown>;
} {
    const tiles = new Array(100).fill(TILES.GRASS);
    tiles[5 * 10 + 5] = TILES.HOUSE;
    return { width: 10, height: 10, tiles, tall: { [TILES.HOUSE]: { height: 1, ground: 0 } } };
}