cleanup
This commit is contained in:
parent
210d407bf9
commit
f5d59cd74f
@ -62,7 +62,7 @@ class Coordinate:
|
|||||||
def getNeighbours(self, includeDiagonal: bool = True, minX: int = -inf, minY: int = -inf,
|
def getNeighbours(self, includeDiagonal: bool = True, minX: int = -inf, minY: int = -inf,
|
||||||
maxX: int = inf, maxY: int = inf, minZ: int = -inf, maxZ: int = inf) -> list[Coordinate]:
|
maxX: int = inf, maxY: int = inf, minZ: int = -inf, maxZ: int = inf) -> list[Coordinate]:
|
||||||
"""
|
"""
|
||||||
Get a list of neighbouring coordinates
|
Get a list of neighbouring coordinates.
|
||||||
|
|
||||||
:param includeDiagonal: include diagonal neighbours
|
:param includeDiagonal: include diagonal neighbours
|
||||||
:param minX: ignore all neighbours that would have an X value below this
|
:param minX: ignore all neighbours that would have an X value below this
|
||||||
@ -73,7 +73,6 @@ class Coordinate:
|
|||||||
:param maxZ: ignore all neighbours that would have an Z value above this
|
:param maxZ: ignore all neighbours that would have an Z value above this
|
||||||
:return: list of Coordinate
|
:return: list of Coordinate
|
||||||
"""
|
"""
|
||||||
neighbourList = []
|
|
||||||
if self.z is None:
|
if self.z is None:
|
||||||
if includeDiagonal:
|
if includeDiagonal:
|
||||||
nb_list = [(-1, -1), (-1, 0), (-1, 1), (0, -1), (0, 1), (1, -1), (1, 0), (1, 1)]
|
nb_list = [(-1, -1), (-1, 0), (-1, 1), (0, -1), (0, 1), (1, -1), (1, 0), (1, 1)]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user