This commit is contained in:
Stefan Harmuth 2022-08-07 19:36:48 +02:00
parent 210d407bf9
commit f5d59cd74f

View File

@ -62,7 +62,7 @@ class Coordinate:
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]:
"""
Get a list of neighbouring coordinates
Get a list of neighbouring coordinates.
:param includeDiagonal: include diagonal neighbours
: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
:return: list of Coordinate
"""
neighbourList = []
if self.z is None:
if includeDiagonal:
nb_list = [(-1, -1), (-1, 0), (-1, 1), (0, -1), (0, 1), (1, -1), (1, 0), (1, 1)]