Refactor Day04 and Day09 to rename methods and variables for improved clarity and update Day09 tests with additional input file and test case

This commit is contained in:
Sebastian Lindemeier
2025-12-11 06:01:54 +01:00
parent 411672d8c3
commit 82772fd4e0
3 changed files with 14 additions and 4 deletions
+2 -1
View File
@@ -64,7 +64,8 @@ public class Day09 : IPuzzleSolver<long>
private bool IsRectangleInsideBorders(CoordinatePair[] borders, CoordinatePair rectangle)
{
return !borders.Any(border => RectangleCrossesBorder(rectangle, border));
var bordersCrossed = borders.Any(border => RectangleCrossesBorder(rectangle, border));
return !bordersCrossed;
}
private CoordinatePair AsPair(Coordinate a, Coordinate b)