renamed var to match algoithm

This commit is contained in:
=
2024-02-07 19:14:49 +01:00
parent 4e761a5cc6
commit eea504461b

View File

@@ -26,9 +26,9 @@ class PolyCube:
orientations[i].append(reorient_tuple(cube, i)) orientations[i].append(reorient_tuple(cube, i))
orientations[i].sort() orientations[i].sort()
oriented_offsets[i] = [(0, 0, 0)]*(n_cubes-1) oriented_offsets[i] = [(0, 0, 0)]*(n_cubes-1)
last_cube = orientations[i][0] reference_cube = orientations[i][0]
for j in range(n_cubes-1): for j in range(n_cubes-1):
oriented_offsets[i][j] = subtract(*last_cube, *orientations[i][j+1]) oriented_offsets[i][j] = subtract(*reference_cube, *orientations[i][j+1])
self.oriented_offsets = oriented_offsets self.oriented_offsets = oriented_offsets
def generate_children(self, max_length:int): def generate_children(self, max_length:int):