diff --git a/2024/day10/part1.py b/2024/day10/part1.py index 4d35974..0740434 100644 --- a/2024/day10/part1.py +++ b/2024/day10/part1.py @@ -25,7 +25,7 @@ def trailhead_tester(ground: list[int], pos_y: int, pos_x: int, ground_y: int, g for y, line in enumerate(ground[min_y:max_y]): for x, value in enumerate(line[min_x:max_x]): if ground[pos_y][pos_x] + 1 == value: - return trailhead_tester(ground, pos_y + (max_y - min_y) - 2, pos_x + (max_x - min_x) - 2, ground_x, ground_y) + return trailhead_tester(ground, y + (max_y - min_y) - 2, x + (max_x - min_x) - 2, ground_y, ground_x) return 0 y_max = len(lines)