chore: setup for day 18
This commit is contained in:
@@ -1,2 +1,24 @@
|
|||||||
// See https://aka.ms/new-console-template for more information
|
using System.Diagnostics;
|
||||||
Console.WriteLine("Hello, World!");
|
|
||||||
|
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)");
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<NoWarn>CA1822</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\RamRun\RamRun.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="TUnit" Version="0.5.6" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -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)");
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net9.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<NoWarn>CA1822</NoWarn>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<InternalsVisibleTo Include="$(AssemblyName).Tests" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="..\INPUT.txt">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -136,6 +136,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChronospatialComputer", "17
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChronospatialComputer.Tests", "17\ChronospatialComputer.Tests\ChronospatialComputer.Tests.csproj", "{39A54627-9BBC-4528-9CD8-8FE2A0A152B6}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ChronospatialComputer.Tests", "17\ChronospatialComputer.Tests\ChronospatialComputer.Tests.csproj", "{39A54627-9BBC-4528-9CD8-8FE2A0A152B6}"
|
||||||
EndProject
|
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
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
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}.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.ActiveCfg = Release|Any CPU
|
||||||
{39A54627-9BBC-4528-9CD8-8FE2A0A152B6}.Release|Any CPU.Build.0 = 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
|
EndGlobalSection
|
||||||
GlobalSection(NestedProjects) = preSolution
|
GlobalSection(NestedProjects) = preSolution
|
||||||
{1AFE2FF1-A55D-4D86-A9BB-9875CA0D14D8} = {270B7829-6D23-4B34-91FE-D87D533AF2AB}
|
{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}
|
{F09B818A-200E-4456-A853-D2F01EB46EEF} = {C50481FF-1766-4C51-BEE3-91BEC5642818}
|
||||||
{C5C907A7-DAD1-419B-93A8-47AC6FC70DC7} = {C0994C02-8EEC-44C3-845A-C221A7A084D6}
|
{C5C907A7-DAD1-419B-93A8-47AC6FC70DC7} = {C0994C02-8EEC-44C3-845A-C221A7A084D6}
|
||||||
{39A54627-9BBC-4528-9CD8-8FE2A0A152B6} = {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
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|||||||
Reference in New Issue
Block a user