From e61f2bd255d0010d0fbeedd366840a77b66f4eef Mon Sep 17 00:00:00 2001 From: Parnic Date: Fri, 10 Dec 2021 13:54:18 -0600 Subject: [PATCH] Enable specifying which day to run I like this tradeoff of running a single day in isolation so the output isn't muddied by other days but also being able to go back and run previous days' solutions (for comparison with friends also participating in advent). The only thing I wish I could do here is run "all" to fire them back to back, but this particular implementation doesn't allow that easily. Maybe later... --- src/main.cs | 47 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/src/main.cs b/src/main.cs index b7ae956..afd62e0 100644 --- a/src/main.cs +++ b/src/main.cs @@ -1,8 +1,39 @@ -//aoc2021.Day02.Go(); -//aoc2021.Day03.Go(); -//aoc2021.Day05.Go(); -//aoc2021.Day06.Go(); -//aoc2021.Day07.Go(); -//aoc2021.Day08.Go(); -//aoc2021.Day09.Go(); -aoc2021.Day10.Go(); +var arg = args.FirstOrDefault(); +switch (arg) +{ + case "1": + aoc2021.Day01.Go(); + break; + + case "2": + aoc2021.Day02.Go(); + break; + + case "3": + aoc2021.Day03.Go(); + break; + + case "5": + aoc2021.Day05.Go(); + break; + + case "6": + aoc2021.Day06.Go(); + break; + + case "7": + aoc2021.Day07.Go(); + break; + + case "8": + aoc2021.Day08.Go(); + break; + + case "9": + aoc2021.Day09.Go(); + break; + + default: + aoc2021.Day10.Go(); + break; +}