     return group
 
 
-class Mine extends Case
+class Mine extends Tile
   constructor: () ->
     super
     circle = @ctx.circle @size/2, @size/2, @size/4

      game.board.cases[casePosition].g.remove()
      if game.board.cases[casePosition].constructor is Flag
        game.board.flagsLbl.attr text: --game.flags
        game.board.cases[casePosition] = new Case @ctx, @x, @y
      else
        game.board.flagsLbl.attr text: ++game.flags
        game.board.cases[casePosition] = new Flag @ctx, @x, @y
    else
      @showCase()


  showCase: () ->
    casePosition = game.positionFromCoord @x, @y

    if game.board.cases[casePosition].constructor isnt Case
      return

    if game.data[casePosition] is game.entities.Mine

class Tile
  constructor: (@ctx, @x, @y) ->
    @size = 42

