This commit is contained in:
Stefan Harmuth 2022-12-03 13:11:07 +01:00
parent 450b092a51
commit 008bab9cf7

View File

@ -38,7 +38,7 @@ class Day(AOCDay):
start = Coordinate(x, 0) start = Coordinate(x, 0)
last_pos = Coordinate(0, 0) last_pos = Coordinate(0, 0)
last_dir = Coordinate(0, 1) last_dir = Coordinate(0, 1)
neighbours = maze.getNeighboursOf(start, includeDiagonal=False) + ['None'] neighbours = maze.getNeighboursOf(start, includeDiagonal=False) + [Coordinate(0, 0)]
while len(neighbours) > 1: while len(neighbours) > 1:
step_count += 1 step_count += 1
if maze.get(start + last_dir): if maze.get(start + last_dir):