This commit is contained in:
Patrick Stevens
2022-12-11 08:58:28 +00:00
committed by GitHub
parent c5b360acfa
commit 4205ec4661
9 changed files with 395 additions and 6 deletions

View File

@@ -17,6 +17,7 @@
<EmbeddedResource Include="..\AdventOfCode2022.Test\Inputs\Day8.txt" />
<EmbeddedResource Include="..\AdventOfCode2022.Test\Inputs\Day9.txt" />
<EmbeddedResource Include="..\AdventOfCode2022.Test\Inputs\Day10.txt" />
<EmbeddedResource Include="..\AdventOfCode2022.Test\Inputs\Day11.txt" />
</ItemGroup>
<ItemGroup>

View File

@@ -20,7 +20,7 @@ module Program =
[<EntryPoint>]
let main _ =
let days = Array.init 10 (fun day -> readResource $"Day%i{day + 1}.txt")
let days = Array.init 11 (fun day -> readResource $"Day%i{day + 1}.txt")
let inline day (i : int) = days.[i - 1]
@@ -73,12 +73,16 @@ module Program =
printfn "%i" (Day9.part1 day9)
printfn "%i" (Day9.part2 day9)
do
let day10 = StringSplitEnumerator.make '\n' (day 10)
printfn "%i" (Day10.part1 day10)
Day10.render (printfn "%s") (Day10.part2 day10)
do
let day11 = StringSplitEnumerator.make '\n' (day 11)
printfn "%i" (Day11.part1 day11)
printfn "%i" (Day11.part2 day11)
time.Stop ()
printfn $"Took %i{time.ElapsedMilliseconds}ms"
0