aoc2023/AdventOfCode/Program.cs

19 lines
499 B
C#
Raw Normal View History

2023-12-05 00:16:22 -06:00
if (args.Length == 0)
{
await Solver.SolveLast(opt => opt.ClearConsole = false);
}
else if (args.Length == 1 && args[0].Contains("all", StringComparison.CurrentCultureIgnoreCase))
{
await Solver.SolveAll(opt =>
{
opt.ShowConstructorElapsedTime = true;
opt.ShowTotalElapsedTimePerDay = true;
});
}
else
{
var indexes = args.Select(arg => uint.TryParse(arg, out var index) ? index : uint.MaxValue);
await Solver.Solve(indexes.Where(i => i < uint.MaxValue));
}