From 35d9374c17b95a904417b635dc8f0bfe4acaf4cf Mon Sep 17 00:00:00 2001 From: Sebastian Lindemeier Date: Thu, 3 Dec 2026 09:58:39 +0100 Subject: [PATCH] Refactor Day03 tree row helper naming --- AoC_2026/Day03.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AoC_2026/Day03.cs b/AoC_2026/Day03.cs index 18b5e11..221d8f0 100644 --- a/AoC_2026/Day03.cs +++ b/AoC_2026/Day03.cs @@ -25,7 +25,7 @@ public class Day03 : IPuzzleSolver { return forestGrid .Select((gridRow, i) => - GetTopCorners(gridRow) + GetTreesInRow(gridRow) .Combinations(2) .Select(pair => (topCorners: pair, bottomIndex: GetBottomEdgeIndex(i, pair))) .Where(tuple => IsBottomEdgeInBounds(tuple.bottomIndex, forestGrid.Length)) @@ -120,7 +120,7 @@ public class Day03 : IPuzzleSolver return index < forestGridLength; } - private static int[] GetTopCorners(char[] row) + private static int[] GetTreesInRow(char[] row) { return [.. row.Index().Where(elem => elem.Item == '#').Select(elem => elem.Index)]; }