public List<Cell> OpenCells(int rowIndex, int columnIndex) { var openCellsMethod = new OpenCellsMathod(Field); if (!Field[rowIndex, columnIndex].IsOpened && !Field[rowIndex, columnIndex].IsMarked) { if (!Field[rowIndex, columnIndex].IsMine) openCellsMethod.CellCalculation(new Cell(rowIndex, columnIndex)); else State = GameState.PlayerLose; } return openCellsMethod.OpenedCells; }
public List <Cell> OpenCells(int rowIndex, int columnIndex) { var openCellsMethod = new OpenCellsMathod(Field); if (!Field[rowIndex, columnIndex].IsOpened && !Field[rowIndex, columnIndex].IsMarked) { if (!Field[rowIndex, columnIndex].IsMine) { openCellsMethod.CellCalculation(new Cell(rowIndex, columnIndex)); } else { State = GameState.PlayerLose; } } return(openCellsMethod.OpenedCells); }