anchor.diff:      );
     }
   
  -  void handleBannerPointerDown(sky.PointerEvent event) {
  -    initialize();
  -    app.scheduleBuild();
  +  void handleToolbarPointerDown(sky.PointerEvent event) {
  +    setState(() {
  +      resetGame();
  +    });
     }
   
     // User action. The user uncovers the cell which can cause losing the game.
     void probe(int x, int y) {
       if (!alive)
         return;
  -    if (uiState[y][x] == flaggedCell)
  -      return;
  -    // Allowed to probe.
  -    if (cells[y][x]) {
  -      // Probed on a mine --> dead!!
  -      uiState[y][x] = explodedCell;
  -      alive = false;
  -    } else {
  -      // No mine, uncover nearby if possible.
  -      cull(x, y);
  -    }
  -    app.scheduleBuild();
  +    if (uiState[y][x] == CellState.flagged)
  +      return;
  +    setState(() {
  +      // Allowed to probe.
  +      if (cells[y][x]) {
  +        // Probed on a mine --> dead!!
  +        uiState[y][x] = CellState.exploded;
  +        alive = false;
  +      } else {
  +        // No mine, uncover nearby if possible.
  +        cull(x, y);
  +      }
  +    });
     }
   
     // User action. The user is sure a mine is at this location.
     void flag(int x, int y) {
  -    if (uiState[y][x] == flaggedCell) {
  -      uiState[y][x] = coveredCell;
  -      --detectedCount;
  -    } else {
  -      uiState[y][x] = flaggedCell;
  -      ++detectedCount;
  -    }
  -    app.scheduleBuild();
  +    setState(() {
  +      if (uiState[y][x] == CellState.flagged) {
  +        uiState[y][x] = CellState.covered;
  +        --detectedCount;
  +      } else {
  +        uiState[y][x] = CellState.flagged;
  +        ++detectedCount;
  +      }
  +    });
     }
   
     // Recursively uncovers cells whose totalMineCount is zero.
  
positive.code:     }
  
      return new Container(
        key: 'minefield',
        padding: new EdgeDims.all(10.0),
        margin: new EdgeDims.all(10.0),
        decoration: new BoxDecoration(backgroundColor: const Color(0xFF6B6B6B)),
        child: new Flex(
          flexRows,
          direction: FlexDirection.vertical,
          key: 'flxv'));
    }
  
    Widget buildToolBar() {
      String banner = hasWon ?
        'Awesome!!' : alive ?
          'Mine Digger [$detectedCount-$totalMineCount]': 'Kaboom! [press here]';
  
      return new ToolBar(
        // FIXME: Strange to have the toolbar be tapable.
        center: new Listener(
          onPointerDown: handleBannerPointerDown,
          child: new Text(banner, style: Theme.of(this.app).text.title)
        )
      );
    }
  
    Widget buildUI() {
      // FIXME: We need to build the board before we build the toolbar because
      // we compute the win state during build step.
      Widget board = buildBoard();
      return new TaskDescription(
        label: 'Mine Digger',
  
negative.code:     if ((y < 0) || (y > cols - 1))
        return;
  
      if (uiState[y][x] == CellState.cleared)
        return;
      uiState[y][x] = CellState.cleared;
  
      if (mineCount(x, y) > 0)
        return;
  