HTML5 Canvas not compiling correctly
I'm working on a large-scale web game and thought I'd test some scripts on Sololearn. I made a script to generate multiple rooms for a dungeon that wouldn't overlap. However, I can only run it once IF I'M LUCKY. The only times it worked were when I ran it for the first time, and then again when I copied/pasted individual code segments into a new project. When I try to run it normally, nothing in the console loads, then after a minute or so, it gives me a "page unresponsive" alert. I have no clue why it's doing this. All of my other code bits are working fine, It's just anything relating to this dungeon script. Not even other compilers can run it. If anyone knows why this is happening, please help! https://www.sololearn.com/compiler-playground/Wne0pFaYQYSs