Don't call methods in constructor for Day1

This commit is contained in:
Alex Thomassen 2022-12-02 17:01:37 +01:00
parent 8ccd370cf5
commit f739f27d69
Signed by: Alex
GPG Key ID: 10BD786B5F6FF5DE
2 changed files with 4 additions and 4 deletions

View File

@ -10,9 +10,6 @@ namespace AdventOfCode2022.Handlers
var lines = System.IO.File.ReadAllText(@"./days/01/input"); var lines = System.IO.File.ReadAllText(@"./days/01/input");
elves = lines.Split("\n\n"); elves = lines.Split("\n\n");
caloriesPerElf = elves.Select(ParseCalories); caloriesPerElf = elves.Select(ParseCalories);
PartA();
PartB();
} }
private int ParseCalories(string elf) private int ParseCalories(string elf)

View File

@ -19,7 +19,10 @@ namespace AdventOfCode2022
} }
static void dayOne() { static void dayOne() {
new Day01(); var day = new Day01();
day.PartA();
day.PartB();
PrintSeparator(); PrintSeparator();
} }
} }