1
0
forked from noxious/server

npm run format

This commit is contained in:
2025-01-09 16:02:26 +01:00
parent 458293a5fc
commit a4437fadce
2 changed files with 9 additions and 3 deletions

View File

@ -112,7 +112,13 @@ class CharacterService extends BaseService {
}
private isValidPosition(pos: Position, grid: number[][], end: Position): boolean {
return pos.positionX >= 0 && pos.positionY >= 0 && pos.positionX < grid[0].length && pos.positionY < grid.length && (grid[pos.positionY][pos.positionX] === 0 || (pos.positionX === end.positionX && pos.positionY === end.positionY))
return (
pos.positionX >= 0 &&
pos.positionY >= 0 &&
pos.positionX < grid[0].length &&
pos.positionY < grid.length &&
(grid[pos.positionY][pos.positionX] === 0 || (pos.positionX === end.positionX && pos.positionY === end.positionY))
)
}
private getDistance(a: Position, b: Position): number {