From 75af0819fa899c2a8796fc91434bca50f061683b Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Fri, 6 Dec 2024 14:26:48 -0600 Subject: [PATCH] chore: setup for day 6 --- .../.idea/indexLayout.xml | 1 + .../GuardGallivant.Tests.csproj | 19 ++++++++++++++ 06/GuardGallivant/GuardGallivant.csproj | 20 ++++++++++++++ 06/GuardGallivant/Program.cs | 26 +++++++++++++++++++ AdventOfCode2024.sln | 20 ++++++++++++++ 5 files changed, 86 insertions(+) create mode 100644 06/GuardGallivant.Tests/GuardGallivant.Tests.csproj create mode 100644 06/GuardGallivant/GuardGallivant.csproj create mode 100644 06/GuardGallivant/Program.cs diff --git a/.idea/.idea.AdventOfCode2024/.idea/indexLayout.xml b/.idea/.idea.AdventOfCode2024/.idea/indexLayout.xml index e1439ad..81379ac 100644 --- a/.idea/.idea.AdventOfCode2024/.idea/indexLayout.xml +++ b/.idea/.idea.AdventOfCode2024/.idea/indexLayout.xml @@ -11,6 +11,7 @@ 04/INPUT.txt 04/PROBLEM.md 05/PROBLEM.md + 06 README.md diff --git a/06/GuardGallivant.Tests/GuardGallivant.Tests.csproj b/06/GuardGallivant.Tests/GuardGallivant.Tests.csproj new file mode 100644 index 0000000..8e2c309 --- /dev/null +++ b/06/GuardGallivant.Tests/GuardGallivant.Tests.csproj @@ -0,0 +1,19 @@ + + + + Exe + net9.0 + enable + enable + CA1822 + + + + + + + + + + + diff --git a/06/GuardGallivant/GuardGallivant.csproj b/06/GuardGallivant/GuardGallivant.csproj new file mode 100644 index 0000000..1673e42 --- /dev/null +++ b/06/GuardGallivant/GuardGallivant.csproj @@ -0,0 +1,20 @@ + + + + Exe + net9.0 + enable + enable + + + + + + + + + PreserveNewest + + + + diff --git a/06/GuardGallivant/Program.cs b/06/GuardGallivant/Program.cs new file mode 100644 index 0000000..0aa47f4 --- /dev/null +++ b/06/GuardGallivant/Program.cs @@ -0,0 +1,26 @@ +using System.Diagnostics; + +if (args.Length is 0) +{ + Console.WriteLine("Please provide a path to the input file."); + return; +} + +if (File.Exists(args[0]) is false) +{ + Console.WriteLine("The provided file does not exist."); + return; +} + +var isPart2 = args.Length is 2 && args[1] is "part2"; +var input = await File.ReadAllTextAsync(args[0]); + +var stopwatch = new Stopwatch(); +stopwatch.Start(); + +// TODO: Implement solution + +stopwatch.Stop(); + +// TODO: Print result +Console.WriteLine($". ({stopwatch.ElapsedMilliseconds}ms)"); \ No newline at end of file diff --git a/AdventOfCode2024.sln b/AdventOfCode2024.sln index 685161c..ab34e7c 100644 --- a/AdventOfCode2024.sln +++ b/AdventOfCode2024.sln @@ -40,6 +40,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PrintQueue", "05\PrintQueue EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PrintQueue.Tests", "05\PrintQueue.Tests\PrintQueue.Tests.csproj", "{4563BCC8-A1E6-448C-BF2D-D0A3E85B9654}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "06", "06", "{293B49F7-594F-4F27-B018-A732820FB797}" + ProjectSection(SolutionItems) = preProject + 06\INPUT.txt = 06\INPUT.txt + 06\PROBLEM.md = 06\PROBLEM.md + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GuardGallivant", "06\GuardGallivant\GuardGallivant.csproj", "{ED53DF83-2434-413E-8D03-47694F4B63F7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GuardGallivant.Tests", "06\GuardGallivant.Tests\GuardGallivant.Tests.csproj", "{F76B41EB-C479-437E-A98B-137A237E2B71}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -89,6 +99,14 @@ Global {4563BCC8-A1E6-448C-BF2D-D0A3E85B9654}.Debug|Any CPU.Build.0 = Debug|Any CPU {4563BCC8-A1E6-448C-BF2D-D0A3E85B9654}.Release|Any CPU.ActiveCfg = Release|Any CPU {4563BCC8-A1E6-448C-BF2D-D0A3E85B9654}.Release|Any CPU.Build.0 = Release|Any CPU + {ED53DF83-2434-413E-8D03-47694F4B63F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ED53DF83-2434-413E-8D03-47694F4B63F7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ED53DF83-2434-413E-8D03-47694F4B63F7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ED53DF83-2434-413E-8D03-47694F4B63F7}.Release|Any CPU.Build.0 = Release|Any CPU + {F76B41EB-C479-437E-A98B-137A237E2B71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F76B41EB-C479-437E-A98B-137A237E2B71}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F76B41EB-C479-437E-A98B-137A237E2B71}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F76B41EB-C479-437E-A98B-137A237E2B71}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {1AFE2FF1-A55D-4D86-A9BB-9875CA0D14D8} = {270B7829-6D23-4B34-91FE-D87D533AF2AB} @@ -101,5 +119,7 @@ Global {3CC6D885-66BC-4F8B-89BF-C299D31AE9FB} = {90547399-676A-4C0E-8CC1-75B7055DE486} {DAF18CE4-2203-407C-BACD-8401BECD74AB} = {7253666E-E9DA-4F2E-9A19-8C40D96CC7C1} {4563BCC8-A1E6-448C-BF2D-D0A3E85B9654} = {7253666E-E9DA-4F2E-9A19-8C40D96CC7C1} + {ED53DF83-2434-413E-8D03-47694F4B63F7} = {293B49F7-594F-4F27-B018-A732820FB797} + {F76B41EB-C479-437E-A98B-137A237E2B71} = {293B49F7-594F-4F27-B018-A732820FB797} EndGlobalSection EndGlobal