day17: missed one var substitution
This commit is contained in:
parent
faaa50240d
commit
d162555dfa
2
day17.py
2
day17.py
@ -22,7 +22,7 @@ def simulate(active_cubes, fourD=False):
|
|||||||
if not (x == cx and y == cy and z == cz):
|
if not (x == cx and y == cy and z == cz):
|
||||||
active_neighbours[(cx, cy, cz)] += 1
|
active_neighbours[(cx, cy, cz)] += 1
|
||||||
else:
|
else:
|
||||||
for cw in [active_cube[3] - 1, active_cube[3], active_cube[3] + 1]:
|
for cw in [w - 1, w, w + 1]:
|
||||||
if not (x == cx and y == cy and z == cz and w == cw):
|
if not (x == cx and y == cy and z == cz and w == cw):
|
||||||
active_neighbours[(cx, cy, cz, cw)] += 1
|
active_neighbours[(cx, cy, cz, cw)] += 1
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user