Day 16 template
authorUmmon <greg.burri@gmail.com>
Fri, 15 Dec 2017 14:48:44 +0000 (15:48 +0100)
committerUmmon <greg.burri@gmail.com>
Fri, 15 Dec 2017 14:48:44 +0000 (15:48 +0100)
AdventOfCode2017/AdventOfCode2017.fsproj
AdventOfCode2017/Day16.fs [new file with mode: 0644]
AdventOfCode2017/Program.fs
Tests/Day16 tests.fs [new file with mode: 0644]
Tests/Tests.fsproj

index a63b01a..6f5af7e 100644 (file)
@@ -25,7 +25,7 @@
     <PlatformTarget>AnyCPU</PlatformTarget>
     <DocumentationFile>bin\$(Configuration)\$(AssemblyName).XML</DocumentationFile>
     <Prefer32Bit>true</Prefer32Bit>
-    <StartArguments>15</StartArguments>
+    <StartArguments>16</StartArguments>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>pdbonly</DebugType>
@@ -74,6 +74,7 @@
     <Compile Include="Day14.fs" />
     <Compile Include="Day14Compact.fs" />
     <Compile Include="Day15.fs" />
+    <Compile Include="Day16.fs" />
     <Compile Include="Program.fs" />
     <None Include="App.config" />
     <Content Include="Data\day01.input">
     <Content Include="Data\day15.input">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
+    <Content Include="Data\day16.input">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
     <Content Include="packages.config" />
   </ItemGroup>
   <ItemGroup>
diff --git a/AdventOfCode2017/Day16.fs b/AdventOfCode2017/Day16.fs
new file mode 100644 (file)
index 0000000..25e51dd
--- /dev/null
@@ -0,0 +1 @@
+module AdventOfCode2017.Day16
\ No newline at end of file
index fb0db9c..d026faf 100644 (file)
@@ -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 (file)
index 0000000..054c63f
--- /dev/null
@@ -0,0 +1,17 @@
+namespace AdventOfCode2017.Tests
+
+open Xunit
+open Xunit.Abstractions
+open Swensen.Unquote
+
+open AdventOfCode2017
+
+type ``Day16 tests`` (output : ITestOutputHelper) =
+
+    [<Fact>]
+    let ``(Part1) From web page`` () =
+        ()
+
+    [<Fact>]
+    let ``(Part2) From web page`` () =
+        ()
\ No newline at end of file
index 55387ec..99d77ca 100644 (file)
@@ -70,6 +70,7 @@
     <Compile Include="Day13 tests.fs" />
     <Compile Include="Day14 tests.fs" />
     <Compile Include="Day15 tests.fs" />
+    <Compile Include="Day16 tests.fs" />
     <Content Include="packages.config" />
     <Content Include="App.config" />
   </ItemGroup>