lpaulger/cribbage-the-game

View on GitHub

Showing 9 of 37 total issues

Function exports has 398 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function(grunt) {
  // show elapsed time at the end
  require('time-grunt')(grunt);
  // load all grunt tasks
  require('load-grunt-tasks')(grunt);
Severity: Major
Found in Gruntfile.js - About 1 day to fix

    File Gruntfile.js has 408 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    // Generated on 2014-04-25 using generator-mobile 1.0.0-alpha.1
    /* jshint ignore:start */
    'use strict';
    var LIVERELOAD_PORT = 35729;
    var lrSnippet = require('connect-livereload')({
    Severity: Minor
    Found in Gruntfile.js - About 5 hrs to fix

      Function getRuns has 51 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        CountScoreKeeper.prototype.getRuns = function(hand, starter){
          var points = 0;
      
          var cards = hand.concat(starter);
      
      
      Severity: Major
      Found in app/scripts/modules/CountScoreKeeper.js - About 2 hrs to fix

        Function Game has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function Game(options){
              this.$deck = new Deck(options.$deck);
        
              var boardSettings = {scoreKeeper:new ScoreKeeper()};
              for(var attrname in options.$board){
        Severity: Minor
        Found in app/scripts/modules/GameModule.js - About 1 hr to fix

          Function bindEvents has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            BaseState.prototype.bindEvents = function(){
              $('#deck').on('click', function(e){
                this.unbindEvents();
                var cardIndex = $('#deck ul').children().indexOf(e.target.parentNode);
                $(e.target).addClass('selected');
          Severity: Minor
          Found in app/scripts/gameStates/BaseState.js - About 1 hr to fix

            Function evaluatePlay has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              PlayScoreKeeper.prototype.evaluatePlay = function(player, playCards, totalPlayedCards){
                var points = 0;
                var pointDifference = 0;
                var additionalMessage = '';
            
            
            Severity: Minor
            Found in app/scripts/modules/PlayScoreKeeper.js - About 1 hr to fix

              Function combinationUtil has 8 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                function combinationUtil(inputArray, sizeOfInputArray, sizeOfCombination, index, tempArray, indexOfCurrentElementOfInputArray, matchesArr, matchCondition)
              Severity: Major
              Found in app/scripts/modules/CountScoreKeeper.js - About 1 hr to fix

                Avoid too many return statements within this function.
                Open

                      return;
                Severity: Major
                Found in app/scripts/gameStates/PlayState.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                        return 0;
                  Severity: Major
                  Found in app/scripts/gameStates/BaseState.js - About 30 mins to fix
                    Severity
                    Category
                    Status
                    Source
                    Language