From f739f27d69dc25f51b5ab9f7aa4fed53b195bf65 Mon Sep 17 00:00:00 2001 From: Alex Thomassen Date: Fri, 2 Dec 2022 17:01:37 +0100 Subject: [PATCH] Don't call methods in constructor for Day1 --- Handlers/Day01.cs | 3 --- Program.cs | 5 ++++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Handlers/Day01.cs b/Handlers/Day01.cs index 9b6becc..dae2858 100644 --- a/Handlers/Day01.cs +++ b/Handlers/Day01.cs @@ -10,9 +10,6 @@ namespace AdventOfCode2022.Handlers var lines = System.IO.File.ReadAllText(@"./days/01/input"); elves = lines.Split("\n\n"); caloriesPerElf = elves.Select(ParseCalories); - - PartA(); - PartB(); } private int ParseCalories(string elf) diff --git a/Program.cs b/Program.cs index b5dd34b..4b012ce 100644 --- a/Program.cs +++ b/Program.cs @@ -19,7 +19,10 @@ namespace AdventOfCode2022 } static void dayOne() { - new Day01(); + var day = new Day01(); + day.PartA(); + day.PartB(); + PrintSeparator(); } }