javiercejudo/javiercejudo.com

View on GitHub
js/controllers/SecretaryProblemCtrl.js

Summary

Maintainability
B
6 hrs
Test Coverage

File SecretaryProblemCtrl.js has 307 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*global angular:true, browser:true */

(function (angular) {
  'use strict';

Severity: Minor
Found in js/controllers/SecretaryProblemCtrl.js - About 3 hrs to fix

    Function generateItemValue has 45 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

              $scope.generateItemValue = function (index) {
                var game = $scope.game;
                var items = game.items;
                var numDigits = game.numDigitsThis;
                var willBeMax;
    Severity: Minor
    Found in js/controllers/SecretaryProblemCtrl.js - About 1 hr to fix

      Function automaticGame has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                $scope.automaticGame = function (n, numberOfGames) {
                  var game = $scope.game;
                  var strategy;
                  var itemIndex;
                  var gameIndex;
      Severity: Minor
      Found in js/controllers/SecretaryProblemCtrl.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status