feat: solve puzzle 3

This commit is contained in:
Stevan Freeborn
2023-12-03 22:54:52 -06:00
parent 575b287b50
commit 19c35bc946
11 changed files with 777 additions and 19 deletions
+4 -4
View File
@@ -9,16 +9,16 @@ public class Program
if (args.Length is 0)
{
Console.WriteLine("Please provide a path to the input file.");
return 1;
return -1;
}
if (File.Exists(args[0]) is false)
{
Console.WriteLine("The provided file does not exist.");
return 2;
return -2;
}
IPuzzleSolver puzzleSolver = args.Length > 1 && args[1] == "2"
IPuzzleSolver puzzleSolver = args.Length > 1 && args[1] == "part2"
? new PartTwoPuzzleSolver()
: new PartOnePuzzleSolver();
@@ -27,7 +27,7 @@ public class Program
Console.WriteLine($"The sum of all calibration values is {result}.");
return 0;
return result;
}
}