public static string RenderGrid(Grid grid) { StringBuilder finalString = new StringBuilder(); for (int y = 0; y < grid.Height; y++) { string rowofhash = new string('#', grid.Width); finalString.Append(rowofhash + "\n"); } return finalString.ToString(); }
static void Main(string[] args) { var grid = new Grid(9, 9); Console.Write(GridRenderer.RenderGrid(grid)); var coordinatesToSweep = CoordinateReader.Read(Console.ReadLine()); var sweepedGrid = grid.Sweep(coordinatesToSweep); Console.Write(GridRenderer.RenderGrid(sweepedGrid)); Console.ReadLine(); }
public GridView(Grid grid) { _grid = grid; }