ben
/
aoc
1
0
Fork 0

make AllParts() print a bit wider

This commit is contained in:
Ben Harris 2022-12-09 11:59:43 -05:00
parent 0dc2c05312
commit 3bdf71633d
1 changed files with 6 additions and 7 deletions

View File

@ -29,18 +29,18 @@ public abstract class Day
private void AllParts(bool verbose = true)
{
Console.Write($"{Year} Day {DayNumber,2}: {PuzzleName,-31}");
Console.Write($"{Year} Day {DayNumber,2}: {PuzzleName,-40} ");
var s = Stopwatch.StartNew();
ProcessInput();
s.Stop();
Console.WriteLine($"{s.ScaleMilliseconds()}ms elapsed processing input");
s.Reset();
s.Start();
var part1 = Part1();
s.Stop();
Console.Write($"Part 1: {part1,-35} ");
Console.Write($"Part 1: {part1,-45} ");
Console.WriteLine(verbose ? $"{s.ScaleMilliseconds()}ms elapsed" : "");
s.Reset();
@ -48,7 +48,7 @@ public abstract class Day
s.Start();
var part2 = Part2();
s.Stop();
Console.Write($"Part 2: {part2,-35} ");
Console.Write($"Part 2: {part2,-45} ");
Console.WriteLine(verbose ? $"{s.ScaleMilliseconds()}ms elapsed" : "");
Console.WriteLine();
@ -66,7 +66,6 @@ public abstract class Day
{
throw new ApplicationException("no days found");
}
if (args.Length == 1 && int.TryParse(args[0], out var dayNum))
{
@ -79,4 +78,4 @@ public abstract class Day
foreach (var d in days) d.AllParts();
}
}
}
}