diff --git a/17/ChronospatialComputer/Program.cs b/17/ChronospatialComputer/Program.cs index 3751555..5f94bf8 100644 --- a/17/ChronospatialComputer/Program.cs +++ b/17/ChronospatialComputer/Program.cs @@ -1,2 +1,24 @@ -// See https://aka.ms/new-console-template for more information -Console.WriteLine("Hello, World!"); +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.ReadAllLinesAsync(args[0]); + +var stopwatch = new Stopwatch(); +stopwatch.Start(); + +// TODO: Implement solution + +stopwatch.Stop(); +Console.WriteLine($". ({stopwatch.ElapsedMilliseconds}ms)"); \ No newline at end of file diff --git a/18/RamRun.Tests/RamRun.Tests.csproj b/18/RamRun.Tests/RamRun.Tests.csproj new file mode 100644 index 0000000..08faab9 --- /dev/null +++ b/18/RamRun.Tests/RamRun.Tests.csproj @@ -0,0 +1,19 @@ + + + + Exe + net9.0 + enable + enable + CA1822 + + + + + + + + + + + diff --git a/18/RamRun/Program.cs b/18/RamRun/Program.cs new file mode 100644 index 0000000..5f94bf8 --- /dev/null +++ b/18/RamRun/Program.cs @@ -0,0 +1,24 @@ +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.ReadAllLinesAsync(args[0]); + +var stopwatch = new Stopwatch(); +stopwatch.Start(); + +// TODO: Implement solution + +stopwatch.Stop(); +Console.WriteLine($". ({stopwatch.ElapsedMilliseconds}ms)"); \ No newline at end of file diff --git a/18/RamRun/RamRun.csproj b/18/RamRun/RamRun.csproj new file mode 100644 index 0000000..715a493 --- /dev/null +++ b/18/RamRun/RamRun.csproj @@ -0,0 +1,20 @@ + + + + Exe + net9.0 + enable + CA1822 + + + + + + + + + PreserveNewest + + + + diff --git a/AdventOfCode2024.sln b/AdventOfCode2024.sln index 90a87ed..bb82bbf 100644 --- a/AdventOfCode2024.sln +++ b/AdventOfCode2024.sln @@ -136,6 +136,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChronospatialComputer", "17 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChronospatialComputer.Tests", "17\ChronospatialComputer.Tests\ChronospatialComputer.Tests.csproj", "{39A54627-9BBC-4528-9CD8-8FE2A0A152B6}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "18", "18", "{B0A56800-A3EC-44D5-89B7-E1F3F83D8D5D}" + ProjectSection(SolutionItems) = preProject + 18\PROBLEM.md = 18\PROBLEM.md + 18\INPUT.txt = 18\INPUT.txt + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RamRun", "18\RamRun\RamRun.csproj", "{05C564A2-EC0E-40D5-AE11-C1DD48F491DA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RamRun.Tests", "18\RamRun.Tests\RamRun.Tests.csproj", "{ADCEF8E2-B613-4145-BA0C-522255589708}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -281,6 +291,14 @@ Global {39A54627-9BBC-4528-9CD8-8FE2A0A152B6}.Debug|Any CPU.Build.0 = Debug|Any CPU {39A54627-9BBC-4528-9CD8-8FE2A0A152B6}.Release|Any CPU.ActiveCfg = Release|Any CPU {39A54627-9BBC-4528-9CD8-8FE2A0A152B6}.Release|Any CPU.Build.0 = Release|Any CPU + {05C564A2-EC0E-40D5-AE11-C1DD48F491DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {05C564A2-EC0E-40D5-AE11-C1DD48F491DA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {05C564A2-EC0E-40D5-AE11-C1DD48F491DA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {05C564A2-EC0E-40D5-AE11-C1DD48F491DA}.Release|Any CPU.Build.0 = Release|Any CPU + {ADCEF8E2-B613-4145-BA0C-522255589708}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ADCEF8E2-B613-4145-BA0C-522255589708}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ADCEF8E2-B613-4145-BA0C-522255589708}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ADCEF8E2-B613-4145-BA0C-522255589708}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(NestedProjects) = preSolution {1AFE2FF1-A55D-4D86-A9BB-9875CA0D14D8} = {270B7829-6D23-4B34-91FE-D87D533AF2AB} @@ -317,5 +335,7 @@ Global {F09B818A-200E-4456-A853-D2F01EB46EEF} = {C50481FF-1766-4C51-BEE3-91BEC5642818} {C5C907A7-DAD1-419B-93A8-47AC6FC70DC7} = {C0994C02-8EEC-44C3-845A-C221A7A084D6} {39A54627-9BBC-4528-9CD8-8FE2A0A152B6} = {C0994C02-8EEC-44C3-845A-C221A7A084D6} + {05C564A2-EC0E-40D5-AE11-C1DD48F491DA} = {B0A56800-A3EC-44D5-89B7-E1F3F83D8D5D} + {ADCEF8E2-B613-4145-BA0C-522255589708} = {B0A56800-A3EC-44D5-89B7-E1F3F83D8D5D} EndGlobalSection EndGlobal