Skip to content

Commit ab217e0

Browse files
committed
refactor to one solve function
1 parent 7e9efdb commit ab217e0

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/advent_of_code/year_2025/day_01.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def position_counter(current_position, target_position=0, ):
2424
return 1
2525
return 0
2626

27-
def solve_part_1(parsed_input):
27+
def solve(parsed_input):
2828

2929
current_position = DIAL_STARTING_POSITION
3030
target_position_count = 0
@@ -33,15 +33,9 @@ def solve_part_1(parsed_input):
3333
turn_direction, distance = parse_instruction(instruction)
3434
current_position = turn_dial(current_position, turn_direction, distance)
3535
target_position_count += position_counter(current_position)
36-
return target_position_count
3736

38-
def solve_part_2(parsed_input):
39-
return None
40-
41-
42-
def solve(input):
43-
part_1_solution = solve_part_1(input)
44-
part_2_solution = solve_part_2(input)
37+
part_1_solution = target_position_count
38+
part_2_solution = None
4539
return (part_1_solution, part_2_solution)
4640

4741

0 commit comments

Comments
 (0)