-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
49 lines (42 loc) · 1.35 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AdventOfCode2016
{
class Program
{
static void Main(string[] args)
{
var day = new Day25();
try
{
Checkpoint();
Utils.WriteLine("** TESTS **", ConsoleColor.Red);
day.Test();
Checkpoint();
Utils.WriteLine("** PART 1 **", ConsoleColor.Red);
Utils.WriteLine(day.Part1(day.Input), ConsoleColor.Green);
Checkpoint();
Utils.WriteLine("** PART 2 **", ConsoleColor.Red);
Utils.WriteLine(day.Part2(day.Input), ConsoleColor.Green);
Checkpoint();
}
catch (NotImplementedException)
{
}
Utils.WriteLine("** FINISHED **", ConsoleColor.Red);
Console.ReadLine();
}
static DateTime timer = DateTime.MaxValue;
private static void Checkpoint()
{
if (timer != DateTime.MaxValue)
{
Utils.WriteLine("Completed in " + (DateTime.Now - timer).TotalSeconds.ToString("0.000s"), ConsoleColor.Gray);
}
timer = DateTime.Now;
}
}
}