 Jax.Controller.create "Level", ApplicationController,
-  index: ->    
+  index: ->
     # unload old level if exists
     if @level
       @level.unload(@world)

      when KeyEvent.DOM_VK_LEFT  then move_letter = 'l'
      when KeyEvent.DOM_VK_RIGHT then move_letter = 'r'
      when KeyEvent.DOM_VK_D     then has_deleted = @level.delete_last_move(@path)
      
    #if move_letter != ' '
    #  window.scrollTo(0, 0)

    has_moved = @level.move(move_letter)

    # save move

    has_moved = 0
    has_deleted = 0
    
    # freezed game, no move allowed
    if @freezed_game
      return false
    
    move_letter = ' '
    switch event.keyCode
      when KeyEvent.DOM_VK_UP    then move_letter = 'u'
