From 6bd47bcd337c4dbc87eef20f5048eca99faea4a2 Mon Sep 17 00:00:00 2001 From: Ummon Date: Fri, 15 Dec 2017 15:48:44 +0100 Subject: [PATCH] Day 16 template --- AdventOfCode2017/AdventOfCode2017.fsproj | 6 +++++- AdventOfCode2017/Day16.fs | 1 + AdventOfCode2017/Program.fs | 5 +++++ Tests/Day16 tests.fs | 17 +++++++++++++++++ Tests/Tests.fsproj | 1 + 5 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 AdventOfCode2017/Day16.fs create mode 100644 Tests/Day16 tests.fs diff --git a/AdventOfCode2017/AdventOfCode2017.fsproj b/AdventOfCode2017/AdventOfCode2017.fsproj index a63b01a..6f5af7e 100644 --- a/AdventOfCode2017/AdventOfCode2017.fsproj +++ b/AdventOfCode2017/AdventOfCode2017.fsproj @@ -25,7 +25,7 @@ AnyCPU bin\$(Configuration)\$(AssemblyName).XML true - 15 + 16 pdbonly @@ -74,6 +74,7 @@ + @@ -121,6 +122,9 @@ PreserveNewest + + PreserveNewest + diff --git a/AdventOfCode2017/Day16.fs b/AdventOfCode2017/Day16.fs new file mode 100644 index 0000000..25e51dd --- /dev/null +++ b/AdventOfCode2017/Day16.fs @@ -0,0 +1 @@ +module AdventOfCode2017.Day16 \ No newline at end of file diff --git a/AdventOfCode2017/Program.fs b/AdventOfCode2017/Program.fs index fb0db9c..d026faf 100644 --- a/AdventOfCode2017/Program.fs +++ b/AdventOfCode2017/Program.fs @@ -71,6 +71,10 @@ let day15 () = let genA, genB = int64 input.[0], int64 input.[1] sprintf "part1 = %A, part2 = %A" (Day15.nbSimilarities1 genA genB) (Day15.nbSimilarities2 genA genB) +let day16 () = + let input = File.ReadAllLines "Data/day16.input" + sprintf "part1 = %A, part2 = %A" () () + let doDay (n : int) = let sw = Diagnostics.Stopwatch () sw.Start () @@ -91,6 +95,7 @@ let doDay (n : int) = | 13 -> day13 () | 14 -> day14 () | 15 -> day15 () + | 16 -> day16 () | _ -> raise <| NotImplementedException () printfn "Result of day %i: %s (time : %i ms)" n result sw.ElapsedMilliseconds diff --git a/Tests/Day16 tests.fs b/Tests/Day16 tests.fs new file mode 100644 index 0000000..054c63f --- /dev/null +++ b/Tests/Day16 tests.fs @@ -0,0 +1,17 @@ +namespace AdventOfCode2017.Tests + +open Xunit +open Xunit.Abstractions +open Swensen.Unquote + +open AdventOfCode2017 + +type ``Day16 tests`` (output : ITestOutputHelper) = + + [] + let ``(Part1) From web page`` () = + () + + [] + let ``(Part2) From web page`` () = + () \ No newline at end of file diff --git a/Tests/Tests.fsproj b/Tests/Tests.fsproj index 55387ec..99d77ca 100644 --- a/Tests/Tests.fsproj +++ b/Tests/Tests.fsproj @@ -70,6 +70,7 @@ + -- 2.45.2