 
 
   mouseOverHandler: (evt) =>
-    if game.state isnt game.states.GameOver
+    if not game.state.is StateManager.GameOver
       @tileBackground.attr fill: '#ccc'
 
 
   mouseOutHandler: (evt) =>
-    if game.state isnt game.states.GameOver
+    if not game.state.is StateManager.GameOver
       @tileBackground.attr fill: '#ddd'
 
 
   mouseUpHandler: (evt) =>
-    return if game.state is game.states.GameOver
-    if game.state is game.states.Empty
+    return if game.state.is StateManager.GameOver
+    if game.state.is StateManager.Empty
       game.initGame @x, @y
 
     if evt.button is 2 # Right click
       casePosition = game.positionFromCoord @x, @y
       game.board.cases[casePosition].g.remove()
       if game.board.cases[casePosition].constructor is Flag
-        game.board.flagsLbl.attr text: --game.flags
+        game.board.flagsLbl.attr text: "Flags: #{--game.flags}/#{game.nbMines}"
         game.board.cases[casePosition] = new Tile @ctx, @x, @y
       else
-        game.board.flagsLbl.attr text: ++game.flags
+        game.board.flagsLbl.attr text: "Flags: #{++game.flags}/#{game.nbMines}"
         game.board.cases[casePosition] = new Flag @ctx, @x, @y
     else
       @showTile()

    game.board.cases[casePosition].g.remove()
    game.board.cases[casePosition] = new TextTile(@ctx, @x, @y, nbMinesAround)

    if ++game.safe is game.board.cases.length - game.nbMines
      console.log "WIN"
      return

    if nbMinesAround is 0
      for [x, y] in game.neighborCoord @x, @y

      return

    if game.data[casePosition] is game.entities.Mine
      game.willDie = casePosition
      return

    nbMinesAround = @countMines()
