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

Function isWalkable

examples/isometric-rpg/main.ts:121–124  ·  view source on GitHub ↗
(x: number, y: number)

Source from the content-addressed store, hash-verified

119}
120
121function isWalkable(x: number, y: number): boolean {
122 const t = tileAt(x, y);
123 return t !== T_WATER && t !== T_WALL;
124}
125
126function tileColor(t: number): Color {
127 if (t === T_GRASS) return { r: 80, g: 160, b: 60, a: 255 };

Callers 1

tryMovePlayerFunction · 0.85

Calls 1

tileAtFunction · 0.70

Tested by

no test coverage detected