Happy you like the game. The levels are procedurally generated but I didn't write the algorithm myself. Check out the tutorial:
https://nluqo.github.io/broughlike-tutorial/stage2.html