wip: 2024/day10/part1

This commit is contained in:
Starnakin 2024-12-13 12:22:28 +01:00
parent 5289db169b
commit 0885af7f06

View File

@ -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)