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); }