app/scripts/core/gameCoordinator.js
/**
   * Displays extra life images equal to the number of remaining lives
   */
Displays extra life images equal to the number of remaining lives
Displays extra life images equal to the number of remaining lives
updateExtraLivesDisplay() {
    this.clearDisplay(this.extraLivesDisplay);
    for (let i = 0; i < this.lives; i += 1) {
      const extraLifePic = document.createElement('img');
      extraLifePic.setAttribute('src', extraLife);
      extraLifePic.style.height = `${this.scaledTileSize * 2}px`;
      this.extraLivesDisplay.appendChild(extraLifePic);
    }
  }
updateExtraLivesDisplay ( ) { this . clearDisplay ( this . extraLivesDisplay ) ; for ( let i = 0 ; i < this . lives ; i += 1 ) { const extraLifePic = document . createElement ( 'img' ) ; extraLifePic . setAttribute ( 'src' , extraLife ) ; extraLifePic . style . height = ` ${ this . scaledTileSize * 2 } ` ; this . extraLivesDisplay . appendChild ( extraLifePic ) ; } }
Displays extra life images equal to the number of remaining lives
Displays extra life images equal to the number of remaining lives