static handleUpgradeBuy(e) {
    const boughtUpgrade = e.target.id;
    const itemPrice = e.target.parentElement.querySelector('span').innerText;
    if (clickerApp.score > itemPrice && clickerApp.upgrades[boughtUpgrade].bought === false) {
      clickerApp.addUpgrade(boughtUpgrade);
      UI.displayBoughtUpgrade(boughtUpgrade);
    }
  }
// called when player buys an upgrade
called when player buys an upgrade
called when player buys an upgrade
static handleUpgradeBuy(e) {
    const boughtUpgrade = e.target.id;
    const itemPrice = e.target.parentElement.querySelector('span').innerText;
    if (clickerApp.score > itemPrice && clickerApp.upgrades[boughtUpgrade].bought === false) {
      clickerApp.addUpgrade(boughtUpgrade);
      UI.displayBoughtUpgrade(boughtUpgrade);
    }
  }
static handleUpgradeBuy ( e ) { const boughtUpgrade = e . target . id ; const itemPrice = e . target . parentElement . querySelector ( 'span' ) . innerText ; if ( clickerApp . score > itemPrice && clickerApp . upgrades [ boughtUpgrade ] . bought === false ) { clickerApp . addUpgrade ( boughtUpgrade ) ; UI . displayBoughtUpgrade ( boughtUpgrade ) ; } }
called when player buys an upgrade
called when player buys an upgrade