public Board(int rows = 8, int cols = 8, int numberOfMines = 20) { Width = rows; Height = cols; _cells = new Cell[rows, cols]; for (int i = 0; i < rows; i++) { for (int j = 0; j < cols; j++) { _cells[i, j] = new Cell { IsFlagged = false, IsOpened = false, Value = 0 }; } } InitMines(numberOfMines); UpdateValues(); }
private string GetCellValue(Cell celula) { if (celula.DataType != null && celula.DataType == CellValues.SharedString) { return GetText(celula.CellValue.Text); } return celula.CellValue.Text; }