Converting from java to p5js, not working as intended

So I have now made the game completely functional. The problem lied in the difference between Java variables and p5js.
When creating a java variable that isnt an object, since you specify what type it will be, it has an automatic default value like “true”, “0”, etc. When I converted my code, I did not add false or true to my variables and that caused them to be undefined. That caused the collision detection to stall.

But now the problem is that I will need to embed the script on a local page, but the script can not find the images when just running the html file. It works perfectly fine if running a local server through processing though. Would I need to add the images somewhere on a file host on the web? Or would I need to make a local server to run the .html? I could maybe use processing to run the webpages and then just put the game somewhere, but I dont know how practical that is. I have updated the repository once again.