AdventOfCode.Common: RunDay overload without day

This commit is contained in:
2023-12-07 21:21:28 +01:00
parent 3e8fa75253
commit a241df39d2
6 changed files with 30 additions and 4 deletions

View File

@@ -63,4 +63,29 @@ public static class DayHelper
Console.WriteLine(ex.StackTrace);
}
}
public static void RunDay(string eventName)
{
for (int currentDay = 1; currentDay < 25; currentDay++)
{
RunDay(eventName, currentDay);
Console.WriteLine(string.Empty);
Console.WriteLine("-------------------------");
Console.WriteLine(string.Empty);
}
}
public static void RunDay(string eventName, string[] args)
{
if (args.Length > 0)
{
int currentDay = Convert.ToInt32(args[0]);
if (currentDay != 0)
{
RunDay(eventName, currentDay);
return;
}
}
RunDay(eventName);
}
}