separate run from solve day8
This commit is contained in:
parent
3d857d9b37
commit
3cd2b6abe2
1 changed files with 6 additions and 3 deletions
|
@ -27,9 +27,8 @@ defmodule Mix.Tasks.Day8 do
|
|||
end
|
||||
end
|
||||
|
||||
def run(_) do
|
||||
{_, puzzle_input} = File.read("./input/2023_8.txt")
|
||||
[instructions, nodes] = puzzle_input |> String.split("\n\n")
|
||||
def solve(input, _) do
|
||||
[instructions, nodes] = input |> String.split("\n\n")
|
||||
|
||||
nodes =
|
||||
for {key, steps} <-
|
||||
|
@ -73,4 +72,8 @@ defmodule Mix.Tasks.Day8 do
|
|||
) |> IO.puts()
|
||||
end
|
||||
|
||||
def run(_) do
|
||||
{_, puzzle_input} = File.read("./input/2023_8.txt")
|
||||
solve(puzzle_input, :part2)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue