Better Typing for Positions and Formats Code

This commit is contained in:
2025-07-14 23:07:44 -03:00
parent 230153403f
commit 952d274c53
14 changed files with 235 additions and 182 deletions

View File

@@ -1,5 +1,5 @@
export const checkPositionWalkable = (pos: RoomPosition) => {
// Check if the position is not obstructed by a wall
const terrain = pos.lookFor(LOOK_TERRAIN);
return terrain.length === 0 || terrain[0] !== 'wall'
}
return terrain.length === 0 || terrain[0] !== "wall";
};