     @board = Snap(@id)
     @board.mouseup @mouseUpHandler
 
-    @nbHorizontalCases = 19
-    @nbVerticalCases = 13
+    @nbHorizontalTiles = 19
+    @nbVerticalTiles = 13
     @cases = []
 
 

  generateBoard: (x, y) ->
    for i in [0...@nbMines]
      loop
        rnd = @rnd(0, (@board.nbHorizontalCases * @board.nbVerticalCases) - 1)
        break if not @around(rnd, x, y)
      @data[rnd] = @entities.Mine


  coordFromPosition: (position) ->
    y = Math.floor(position / @board.nbHorizontalCases)
    x = position - y * @board.nbHorizontalCases
    return [x, y]


  positionFromCoord: (x, y) ->
    position = x + y * @board.nbHorizontalCases


  isValidPosition: (x, y) ->
    return x >= 0 and x < @board.nbHorizontalCases and
           y >= 0 and y < @board.nbVerticalCases


  showMines: (deadPosition) ->

    @g.append group


class ExplodedMine extends Tile
  constructor: () ->
    super
    circle = @ctx.circle @size/2, @size/2, @size/4
