Removed TSC in favour of node's own Typescript exec.
This commit is contained in:
@ -140,8 +140,8 @@ class CharacterMoveService extends BaseService {
|
||||
}
|
||||
|
||||
private getDistance(a: Position, b: Position): number {
|
||||
const dx = Math.abs(a.positionX - b.positionX),
|
||||
dy = Math.abs(a.positionY - b.positionY)
|
||||
const dx = Math.abs(a.positionX - b.positionX)
|
||||
const dy = Math.abs(a.positionY - b.positionY)
|
||||
// Manhattan distance for straight paths, then Euclidean for diagonals
|
||||
return dx + dy + (Math.sqrt(2) - 2) * Math.min(dx, dy)
|
||||
}
|
||||
|
Reference in New Issue
Block a user