MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / tileAt

Function tileAt

examples/dungeon-crawl/main.ts:57–60  ·  view source on GitHub ↗
(x: number, y: number)

Source from the content-addressed store, hash-verified

55let messageTimer = 3;
56
57function tileAt(x: number, y: number): number {
58 if (x < 0 || x >= MAP_WIDTH || y < 0 || y >= MAP_HEIGHT) return TILE_WALL;
59 return map[y * MAP_WIDTH + x];
60}
61
62function setTile(x: number, y: number, tile: number): void {
63 if (x >= 0 && x < MAP_WIDTH && y >= 0 && y < MAP_HEIGHT) {

Callers 1

tryMoveFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected