 module.exports = class ShuffleGrid
   constructor: (@levels, @random, @$container) ->
     @random ?= new Random()
-    @movesTaken = 0
     @levelIndex = 0
     
     # Make the jQuery grid

        @_slideTransition(nextLevel)
    
    else
      $img = $ "<img style='height: 100%; width: 100%;' src='#{@level.image}'/>"
      thisGrid = this
      $img.fadeIn 1000, ->
        nextLevel = thisGrid._getNextLevel()
        if nextLevel?
          thisGrid.loadLevel(nextLevel)
          thisGrid.shuffle()
        else
          thisGrid.trigger('level-complete')
      @$grid.prepend $img


  _zoomOutTransition: (nextLevel) ->


    gridWidth = oldTiles[0].width*oldTiles[0].level.gridSize[0]

    $img = $("<img style='position: absolute; height: 100%; width: 100%;' src='#{oldLevel.image}'/>")
    $img.fadeIn 1000, =>
      slideDuration = 3000
      for tile, i in @tiles
