           if($(dot).attr('data-bracket') is 'right') then counter--
           if(counter == 0)
             matchingRightBracket = dot
-            console.log "Malfoy"
             break
         # Remove the left bracket 
         $(element).attr('data-bracket','none')



  getNextBracketColor: (bracketsCounter) ->
    brightnessPercent = 70-((bracketsCounter*2)/@numberDots)*20
    return "hsl(120, 50%, #{brightnessPercent}%)"

    

      thisReference = this
      $('#added-goal li.dice[data-index='+index+']').remove()
      @cleanUpBrackets()
      @pairUpBrackets()
      $(html).appendTo("#notadded-goal").bind 'click', (event) ->
        thisReference.addDiceToGoal($(this).data('index'));


  cleanUpBrackets: () ->
    thisReference = this
    for d in $('#added-goal li')
      twoDotsCase = ($(d).prev().attr('data-bracket') is 'none') and ($(d).attr('data-bracket') is 'none')
