       fontFamily: 'Arial', fontSize: 38, alignmentBaseline: 'central',
       textAnchor: 'middle', fill: @colors[@number-1]
     @g.append text
+
+
+  mouseUpHandler: (evt) =>
+    return if game.state is game.states.GameOver
+    if @countFlags() is @countMines()
+      for [x, y] in game.neighborCoord @x, @y
+        game.board.cases[game.positionFromCoord(x, y)].showCase()
 
 
 class @Game

    @g.unmouseover()
    @g.unmouseout()
    @g.unmouseup()

    @g.mouseup (evt) =>
      return if game.state is game.states.GameOver
      if @countFlags() is @countMines()
        for [x, y] in game.neighborCoord @x, @y
          game.board.cases[game.positionFromCoord(x, y)].showCase()

    @tileBackground.attr fill: '#fff'
    text = @ctx.text @size/2, @size/2, @number

    if nbMinesAround is 0
      for [x, y] in game.neighborCoord @x, @y
        game.board.cases[game.positionFromCoord(x, y)].showCase()


  countMines: () ->
    nbMines = 0
