From 52bf32f6921b8759ce81be96e2860357bd45be1c Mon Sep 17 00:00:00 2001 From: Sebastian Lindemeier Date: Mon, 8 Dec 2025 10:32:56 +0100 Subject: [PATCH] Refactor Day07 to rename variables and fix return type for timeline count methods --- AoC_2025/Day07.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/AoC_2025/Day07.cs b/AoC_2025/Day07.cs index 0e6ae30..e215158 100644 --- a/AoC_2025/Day07.cs +++ b/AoC_2025/Day07.cs @@ -29,15 +29,15 @@ public class Day07 : IPuzzleSolver { var grid = ParsePuzzleInput(pathToPuzzleInput); var start = GetStart(grid); - var nodesWithCount = GetTimelinesCountRecursive(grid, start, []); - return nodesWithCount; + var timelinesCount = GetTimelinesCountRecursive(grid, start, []); + return timelinesCount; } public long SolvePart2Again(string pathToPuzzleInput) { var grid = ParsePuzzleInput(pathToPuzzleInput); - var nodesWithCount = GetTimelinesCount(grid); - return nodesWithCount.Sum(); + var timelinesCount = GetTimelinesCount(grid); + return timelinesCount; } private Coordinate GetStart(string[] grid) @@ -98,7 +98,7 @@ public class Day07 : IPuzzleSolver return res; } - private long[] GetTimelinesCount(string[] grid) + private long GetTimelinesCount(string[] grid) { var numbersGrid = grid .Select(line => line.Select(c => 0L).ToArray()) @@ -125,6 +125,6 @@ public class Day07 : IPuzzleSolver } } - return numbersGrid[^1]; + return numbersGrid[^1].Sum(); } } \ No newline at end of file