added generate_neighbors

This commit is contained in:
=
2024-02-06 16:08:43 +01:00
parent a346503697
commit 5bcef8336b

View File

@@ -1,4 +1,14 @@
def generate_neighbors(a, b, c):
return [
(a-1, b, c),
(a+1, b, c),
(a, b-1, c),
(a, b+1, c),
(a, b, c-1),
(a, b, c+1)
]
def reorient_tuple(t, n): def reorient_tuple(t, n):
t, _ = _invert(*_flip(*_rotate(t, n))) t, _ = _invert(*_flip(*_rotate(t, n)))
return t return t