Update day 19 solution
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-12-19 21:54:46 +01:00
parent 0050e6dd76
commit 7def74b81e

View File

@@ -106,8 +106,8 @@ def transform(scanners, idx, done=[]):
(x1, y1, z1) = scanners[n]['beacons'][overlapping[1][1]]
v1 = (x0 - x1, y0 - y1, z0 - z1)
transform_func = get_transform_func(v0, v1)
for i in range(len(scanners[n]['beacons'])):
(x, y, z) = scanners[n]['beacons'][i]
for i, b in enumerate(scanners[n]['beacons']):
(x, y, z) = b
scanners[n]['beacons'][i] = eval(transform_func)
(x0, y0, z0) = scanners[idx]['beacons'][overlapping[0][0]]
(x1, y1, z1) = scanners[n]['beacons'][overlapping[0][1]]