From 5a82d166d30c2609516e49ea8ff5ea142efa38e8 Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Thu, 19 Dec 2024 00:27:38 -0600 Subject: [PATCH] fix: correct naming --- 08/ResonantCollinearity/Program.cs | 8 ++++---- 14/RestroomRedoubt/Program.cs | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/08/ResonantCollinearity/Program.cs b/08/ResonantCollinearity/Program.cs index 449a71b..3338e22 100644 --- a/08/ResonantCollinearity/Program.cs +++ b/08/ResonantCollinearity/Program.cs @@ -103,7 +103,7 @@ record Point(int RowIndex, int ColIndex) record Slope(int Rise, int Run); -class Line(Point start, Point end, string[] Map) +class Line(Point start, Point end, string[] map) { private readonly Slope _slope = new(end.RowIndex - start.RowIndex, end.ColIndex - start.ColIndex); @@ -116,7 +116,7 @@ class Line(Point start, Point end, string[] Map) { new(end.RowIndex - doubledRise, end.ColIndex - doubledRun), new(start.RowIndex + doubledRise, start.ColIndex + doubledRun), - }.Where(p => p.IsOnMap(Map)).ToList(); + }.Where(p => p.IsOnMap(map)).ToList(); } public List GetPart2Antinodes() @@ -127,7 +127,7 @@ class Line(Point start, Point end, string[] Map) // start antenna back var currentPoint = start; - while (currentPoint.IsOnMap(Map)) + while (currentPoint.IsOnMap(map)) { antinodes.Add(currentPoint); currentPoint = new(currentPoint.RowIndex - _slope.Rise, currentPoint.ColIndex - _slope.Run); @@ -137,7 +137,7 @@ class Line(Point start, Point end, string[] Map) // end antenna out currentPoint = end; - while (currentPoint.IsOnMap(Map)) + while (currentPoint.IsOnMap(map)) { antinodes.Add(currentPoint); currentPoint = new(currentPoint.RowIndex + _slope.Rise, currentPoint.ColIndex + _slope.Run); diff --git a/14/RestroomRedoubt/Program.cs b/14/RestroomRedoubt/Program.cs index e493119..2536065 100644 --- a/14/RestroomRedoubt/Program.cs +++ b/14/RestroomRedoubt/Program.cs @@ -155,10 +155,10 @@ partial record Robot ); } - public (int X, int Y) Move(int MaxX, int MaxY) + public (int X, int Y) Move(int maxX, int maxY) { - PositionX = (PositionX + VelocityX + MaxX) % MaxX; - PositionY = (PositionY + VelocityY + MaxY) % MaxY; + PositionX = (PositionX + VelocityX + maxX) % maxX; + PositionY = (PositionY + VelocityY + maxY) % maxY; return (PositionX, PositionY); }