src/HTMLBoardRenderer.js
/**
   * dispose() and listenToEvents() methods are best kept next to each other.
   * So that we don't forget to unsubscribe from events at the end of life.
   */
dispose() and listenToEvents() methods are best kept next to each other.
So that we don't forget to unsubscribe from events at the end of life.
dispose () and listenToEvents () methods are best kept next to each other . So that we don ' t forget to unsubscribe from events at the end of life .
dispose() {
    this.container.innerText = '';
    this.board.off('play', this.renderPositions);
    this.board.off('remove', this.removePosition);
    this.board.off('clear', this.clear);
    this.board.off('winLengthChanged', this.renderPositions, this);
    this.inputHandler.dispose();
  }
dispose ( ) { this . container . innerText = '' ; this . board . off ( 'play' , this . renderPositions ) ; this . board . off ( 'remove' , this . removePosition ) ; this . board . off ( 'clear' , this . clear ) ; this . board . off ( 'winLengthChanged' , this . renderPositions , this ) ; this . inputHandler . dispose ( ) ; }
dispose() and listenToEvents() methods are best kept next to each other.
dispose () and listenToEvents () methods are best kept next to each other .