     # Handle loading the tutorial
     if @tutorial
       @clues = levels.easy[0].clues
+
+    @cellCount = Math.sqrt(@clues.length)
 
     # Load level/parse clues
     for i in [0..9]

    @grid = @elem.find('.grid')
    @gridBackground = @elem.find('.grid-background')

    # Get size of grid blocks - round to nearest whole number to prevent weirdness w/ decimals
    @blockSize = Math.round(@grid.width() / 10)

  # Triggered on mousedown or touchstart
  onActionStart: (e) ->
    e.preventDefault()

      }]

  resize: (width, height, orientation) ->
    @width = width
    @height = height
    @orientation = orientation
    @resizeGrid()

  resizeGrid: ->
    smallestDimension = if @orientation is 'landscape' then @height else @width
    gridBackgroundSize = Math.round(smallestDimension * @GRID_BACKGROUND_SIZE_RATIO / 10) * 10

    @gridBackground.width(gridBackgroundSize)
    @gridBackground.height(gridBackgroundSize)

    if @orientation is 'landscape'
      horizontalMargin = (@height - @gridBackground.width() - 10) / 2
      verticalMargin = (gridBackgroundSize - @gridBackground.height()) / 2
    else if @orientation is 'portrait'
      verticalMargin = (@width - @gridBackground.height() - 10) / 2
      horizontalMargin = (gridBackgroundSize - @gridBackground.width()) / 2

    @gridBackground.css
      margin: "#{horizontalMargin}px #{verticalMargin}px"

    gridSize = Math.round(@gridBackground.width() * @GRID_SIZE_RATIO / 10) * 10
    @grid.width(gridSize)
    @grid.height(gridSize)

    @cellSize = gridSize / 10

    @$('.vertical.clue', @gridBackground).css
      width: @cellSize
      height: gridBackgroundSize - gridSize

    @$('.horizontal.clue', @gridBackground).css
      width: gridBackgroundSize - gridSize
      height: @cellSize

    @$('.minimap', @gridBackground).css
      width: gridBackgroundSize - gridSize
      height: gridBackgroundSize - gridSize

    @grid.children('div').css
      width: @cellSize
      height: @cellSize

    # Resize the icons on the game buttons to ensure correct aspect ratio
    iconWidth = Math.round(@$('.actions.mark').height() * 0.5)
    @$('.actions .icon').css
      width: iconWidth
      height: iconWidth

  # Remove event handlers and hide this view's elem
  hide: (duration = 500, callback) ->
    super duration, callback

    # Do all this stuff after transition offscreen
