Commits

Lucian Brănescu-Mihăilă committed 89ee55e

Add () for all function/method calls to reduce ambiguation.

Comments (0)

Files changed (1)

app/static/scripts/game.coffee

     @env.anvil.view.innerHTML = 'click to start'
     @env.timer.view.innerHTML = @duration
 
-    $(@env.anvil.view).bind 'mousedown', @clicked
-    $(@env.anvil.view).bind 'mouseup', @initCountdown
+    $(@env.anvil.view).bind('mousedown', @clicked)
+    $(@env.anvil.view).bind('mouseup', @initCountdown)
 
   initCountdown: (ev) =>
-    $(@env.anvil.view).unbind 'mouseup', @initCountdown
+    $(@env.anvil.view).unbind('mouseup', @initCountdown)
     @running = true
     @countdown()
 
       @cleanup()
 
   cleanup: ->
-    $(@env.anvil.view).unbind 'mousedown', @clicked
+    $(@env.anvil.view).unbind('mousedown', @clicked)
     
     @env.timer.view.innerHTML = 0
     @env.cps.view.innerHTML = 0
   gamesButtons = $("##{env.menu.id} > .#{env.menu.gamesClass}")
   forfeitButton = $("##{env.menu.id} > .#{env.menu.forfeitClass}")
 
-  gamesButtons.unbind 'click' # can stay bound between games
+  gamesButtons.(unbind 'click') # can stay bound between games
   gamesAction = (ev) ->
-    gamesButtons.unbind 'click', gamesAction
+    gamesButtons.unbind('click', gamesAction)
 
-    forfeitButton.unbind 'click' # can stay bound between games
+    forfeitButton.unbind('click') # can stay bound between games
     forfeitAction = (ev) ->
-      forfeitButton.unbind 'click', forfeitAction
+      forfeitButton.unbind('click', forfeitAction)
       game.forfeit()
 
-    forfeitButton.bind 'click', forfeitAction
+    forfeitButton.bind('click', forfeitAction)
 
     duration = parseInt this.innerHTML
-    game = new Game env, duration, setup
+    game = new Game(env, duration, setup)
     
-  gamesButtons.bind 'click', gamesAction
+  gamesButtons.bind('click', gamesAction)
 
 env =
   anvil: