     task
 
 module.exports = (robot) ->
-  #tasks = new Tasks robot
   goodbad = new GoodBad robot
   
-  robot.respond /(good:) (.+?)$/i, (msg) ->
+  robot.respond /(good) (.+?)$/i, (msg) ->
     good = goodbad.good msg.match[2]
     msg.send "The sprint is thriving!"
 
-  robot.respond /(bad:) (.+?)$/i, (msg) ->
+  robot.respond /(bad) (.+?)$/i, (msg) ->
     bad = goodbad.bad msg.match[2]
     msg.send "The sprint is festering..."
 
-#  robot.respond /(task add|add task) (.+?)$/i, (msg) ->
-#    task = tasks.add msg.match[2]
-#    msg.send "Task added: ##{task.num} - #{task.task}"
-
-  robot.respond /(good list)/i, (msg) ->
+  robot.respond /(goodlist)/i, (msg) ->
     if goodbad.goodall().length > 0
       response = ""
       for good, num in goodbad.goodall()

    else 
      msg.send "Nothing good happened."

#  robot.respond /(task list|list tasks)/i, (msg) ->
#    if tasks.all().length > 0
#      response = ""
#      for task, num in tasks.all()
#        response += "##{task.num} - #{task.task}\n"
#      msg.send response
#    else
#      msg.send "There are no tasks"

  robot.respond /(task delete|delete task) #?(\d+)/i, (msg) ->
    taskNum = msg.match[2]

# Allows good and bad things to be added to Hubot for sprint retrospective
#  Based on tasks.coffee
#
# good <good thing> - Add something good that happened this sprint
# bad <bad thing> - Add something bad that happened this sprint
# goodlist - List all good things that happened
# badlist - List all bad things that happened

class GoodBad
  constructor: (@robot) ->
    @goodcache = []
    @badcache = []
    @robot.brain.on 'loaded', =>
      if @robot.brain.data.good
        @goodcache = @robot.brain.data.good
