forked from noxious/server
npm run format
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user