Пример #1
0
    private void TryToFillCell(Cell cell)
    {
        if (FillingIsAllowed(cell))
        {
            cell.Toggle(true);
            cell.SetPrevCell(_prevCell);
            _filledCellsCount++;
            _prevCell = cell;
            _levelSettings.PlayFillSound();
        }

        if (IsCompletelyFilled())
        {
            _currentLevelCompleted = true;
            OnLevelCompleted();
        }
    }