app/scripts/core/gameCoordinator.js
/**
   * Flashes ghosts blue and white to indicate the end of the powerup
   * @param {Number} flashes - Total number of elapsed flashes
   * @param {Number} maxFlashes - Total flashes to show
   */
Flashes ghosts blue and white to indicate the end of the powerup
@param {Number} flashes - Total number of elapsed flashes
@param {Number} maxFlashes - Total flashes to show
Flashes ghosts blue and white to indicate the end of the powerup @param { Number } flashes - Total number of elapsed flashes @param { Number } maxFlashes - Total flashes to show
flashGhosts(flashes, maxFlashes) {
    if (flashes === maxFlashes) {
      this.scaredGhosts.forEach((ghost) => {
        ghost.endScared();
      });
      this.scaredGhosts = [];
      if (this.eyeGhosts === 0) {
        this.soundManager.setAmbience(this.determineSiren(this.remainingDots));
      }
    } else if (this.scaredGhosts.length > 0) {
      this.scaredGhosts.forEach((ghost) => {
        ghost.toggleScaredColor();
      });
      this.ghostFlashTimer = new Timer(() => {
        this.flashGhosts(flashes + 1, maxFlashes);
      }, 250);
    }
  }
flashGhosts ( flashes , maxFlashes ) { if ( flashes === maxFlashes ) { this . scaredGhosts . forEach ( ( ghost ) => { ghost . endScared ( ) ; } ) ; this . scaredGhosts = [ ] ; if ( this . eyeGhosts === 0 ) { this . soundManager . setAmbience ( this . determineSiren ( this . remainingDots ) ) ; } } else if ( this . scaredGhosts . length > 0 ) { this . scaredGhosts . forEach ( ( ghost ) => { ghost . toggleScaredColor ( ) ; } ) ; this . ghostFlashTimer = new Timer ( ( ) => { this . flashGhosts ( flashes + 1 , maxFlashes ) ; } , 250 ) ; } }
Flashes ghosts blue and white to indicate the end of the powerup
 @param {Number} flashes - Total number of elapsed flashes
 @param {Number} maxFlashes - Total flashes to show
Flashes ghosts blue and white to indicate the end of the powerup @param { Number } flashes - Total number of elapsed flashes @param { Number } maxFlashes - Total flashes to show