public static void Create() { for (int row = 0; row <= Grid.grid.GetLength(0)-1; row++) { for (int col = 0; col <= Grid.grid.GetLength(1)-1; col++) { grid[row, col] = new Cell(true, row, col); } } }
private static Cell[,] getGrid(List<Cell> cells, int r, int c) { Cell[,] temp = new Cell[r, c]; int i = 0; for (int row = 0; row <= r-1; row++) { for (int col = 0; col <= c-1; col++) { temp[row, col] = cells[i++]; } } return temp; }