Idle Miner part 2: levels service My previous post had no response, so there is part of the whole - levels service. It stores levels with it's attributes. I'd like to hear any suggestions about code readability and code performance.

(function() {
    'use strict';

    angular
        .module('app.mine')
        .service('levels', LevelsService);

    function LevelsService() {
        var service = {
                addLevel: addLevel,
                getNewLevelCost: getNewLevelCost,
                levels: []
            };

        activate();

        return service;

        function activate() {
            service.addLevel();
        }

        function addLevel() {
            service.levels.push(new Level(service.levels.length + 1));
        }

        function getNewLevelCost() {
            return Math.pow(60, service.levels.length);
        }

    }

    function Level(deep) {
        var level = this;

        level.deep = deep;
        level.workers = [];
    }

    Level.prototype.addWorker = levelAddWorker;
    Level.prototype.dig = levelDig;
    Level.prototype.getNewWorkerCost = levelGetNewWorkerCost;

    function Worker(deep) {
        var worker = this;

        worker.deep = deep;
    }

    Worker.prototype.dig = workerDig;

    function levelAddWorker() {
        var level = this;
        level.workers.push(new Worker(level.deep));
    }

    function levelDig() {
        var level = this;
        return {Coal: Math.pow(10, level.deep - 1)};
    }

    function levelGetNewWorkerCost() {
        var level = this;
        return Math.pow(10, level.deep) * Math.pow(1.4, level.workers.length);
    }

    function workerDig() {
        var worker = this;
        return {Coal: Math.pow(10, worker.deep - 1)};
    }

})();
Too many indirections:


activate just calls addLevel
addLevel just adds a level


And, at least in the posted code, these functions are not used anywhere else.
Is there a merit in having these functions?
You could remove these functions and replace with the simple code that adds one level. 

These local variables are just noise in the code:


var level = this;



Inside a Level class, if you use this it's perfectly understandable that you're working with a "level", no need for the extra local variable that just makes your code longer for no apparent benefit.

The name deep might be better as depth.