Add day 1
This commit is contained in:
15
Program.cs
15
Program.cs
@@ -25,6 +25,19 @@ var selectedDay = AnsiConsole.Prompt(select);
|
||||
|
||||
var stopWatch = new Stopwatch();
|
||||
|
||||
// Read input
|
||||
try
|
||||
{
|
||||
selectedDay.ReadInput();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
AnsiConsole.WriteException(e);
|
||||
|
||||
Environment.Exit(1);
|
||||
}
|
||||
|
||||
// Part 1
|
||||
AnsiConsole.MarkupLine($"[cyan]Running [yellow]{selectedDay}[/]...[/]\n");
|
||||
|
||||
AnsiConsole.MarkupLine("[cyan]Part [yellow]1[/] result:[/]");
|
||||
@@ -44,7 +57,9 @@ catch (Exception e)
|
||||
|
||||
stopWatch.Reset();
|
||||
|
||||
// Part 2
|
||||
AnsiConsole.MarkupLine("\n[cyan]Part [yellow]2[/] result:[/]");
|
||||
|
||||
try
|
||||
{
|
||||
stopWatch.Start();
|
||||
|
||||
Reference in New Issue
Block a user