Help I don't know how to make a image get bigger as a value goes up

I am making a catcher game in JavaScript where your a beard and catch bacon for points and I want to try and make my beard grow as I catch bacon how would I do this.

Here is my code : https://github.com/Nathan-Cox/BeardCatcher2

Your code has several libraries attached, but I don’t see where your JS code is. Depending on how you want to set up your game, this sounds like basic DOM manipulation to me.

const beard = document.querySelector('#beard');

 //grabs the element with the id of "beard"

beard.style.height = "100px";

//sets the beard's height to 100px;

const button = document.querySelector('#beardBtn');

//grabs the button  with the if of "beardBtn".

button.eventListener('click', clickHandler);

//creates an event listener that waits for clicks on the "button" element. Callback function of "clickHandler," which we must write now.

let click = 0; //global scope variable to count the clicks
function clickHandler() {
  click++;
 //increments the click variable
  beard.style.height = beard.style.height + click;
//adds the variable's amount to the beard's height
  if (beard.style.height >= 500) {
    alert('Your beard is very impressive! You win!);
    beard.style.height = 100;
  }
}

By the way, I’m sure the parts of manipulating and comparing the height are wrong, so you’ll have to research that a bit.

You should probably try and use the OOP code structure already in place instead of doing direct DOM manipulation. But I’m suspecting you may not fully understand the code yet. How are you even building it? You seem to have changed the name for the entry point file but not updated it in the webpack.config.js so I’m not sure how you are creating a new bundle file?

I assume you added the grow method to the Game class? I’d think you should be able to call that method inside the checkCollisions method and use it like the increaseDifficulty method is being used. But I haven’t run the code so it’s just a guess.

If you have updated code for this you should push it to GitHub so we don’t see stale code. I would also like to see the original code just for reference so we know what you have changed and added.