 
 test "adding many cooldowns to default instance variables", 3, ->
   obj.I = 
-    cool: 20
+  obj = GameObject
     rad: 0
     tubular: 0
     cooldowns:

  equals obj.I.tubular, 4

test "#addCooldown", 3, ->
  obj.addCooldown 'health'

  3.times ->
    obj.update()

module "Approachable"

test "objects count down each of their cooldowns", 2, ->
  obj = GameObject
    bullet: 83
    cooldowns:
      bullet:
        target: 3
        approachBy: 1

  obj.include(Approachable)

    obj.update()

  equals obj.I.bullet, 78, "bullet should decrease by 5"

  100.times ->
    obj.update()

  equals obj.I.bullet, 3, "bullet should not cool down part target value"

test "should handle negative value", ->
  obj = GameObject
    powerup: -70
    cooldowns:
      powerup:
        target: 0
        approachBy: 1

  obj.include(Approachable)

    obj.update()

  equals obj.I.powerup, -59, "powerup should increase by 11"
