23 lines
653 B
C#
23 lines
653 B
C#
namespace AdventOfCode.Solutions._2023.Day_13
|
|
{
|
|
internal static class GridMirrorExtention
|
|
{
|
|
public static (List<string> Rows, List<string> Columns) GetRowsAndColumns(this Grid<Node> grid)
|
|
{
|
|
List<string> rows = [], columns = [];
|
|
for (int rowIndex = 0; rowIndex < grid.Rows; rowIndex++)
|
|
{
|
|
rows.Add(grid.GetRowAsString(rowIndex));
|
|
}
|
|
|
|
for (int columnIndex = 0; columnIndex < grid.Columns; columnIndex++)
|
|
{
|
|
columns.Add(grid.GetColumnAsString(columnIndex));
|
|
}
|
|
|
|
return (rows, columns);
|
|
}
|
|
|
|
}
|
|
}
|