More typescript improvements

This commit is contained in:
2025-02-07 20:54:55 +01:00
parent f5e7d10fb4
commit 52b8a9b7ad
12 changed files with 35 additions and 14 deletions

View File

@ -133,9 +133,9 @@ class CharacterMoveService extends BaseService {
return (
pos.positionX >= 0 &&
pos.positionY >= 0 &&
pos.positionX < grid[0].length &&
pos.positionX < grid[0]!.length &&
pos.positionY < grid.length &&
(grid[pos.positionY][pos.positionX] === 0 || (pos.positionX === end.positionX && pos.positionY === end.positionY))
(grid[pos.positionY]![pos.positionX] === 0 || (pos.positionX === end.positionX && pos.positionY === end.positionY))
)
}