inDistance

fun inDistance(other: CoordGrid, distance: Int): Boolean

Checks whether this coord grid is within distance of the other coord grid. If the coord grids are on different levels, this function will always return false.

Return

true if the other coord grid is within distance of this coord grid.

Parameters

other

the other coord grid to check against.

distance

the distance to check (inclusive). A distance of 0 implies same coordinate.