Ejemplo n.º 1
0
        public List <Cell> OpenCell(IPoint point)
        {
            var cell  = gameField.GetCell(point);
            var cells = new List <Cell>();

            if (cell.IsBomb)
            {
                OnGameOver?.Invoke(cell);
                return(cells);
            }
            cells.Add(cell);
            if (cell.IsEmpty)
            {
                cells.AddRange(gameField.GetEmptyCellsAround(new Point(cell.RowIndex, cell.ColumnIndex)));
            }
            return(cells);
        }