I made a random dungeon generator

I made a random dungeon generator



I was working on the roguelike dungeon crawler project and decided to go this direction with the level design. It stores all the x,y coordinates as object keys to their corresponding tile type and assigns them to the state (or some other object for the final implementation): myObj = {…[1,2] : ‘floor’, [1,3] : ‘floor’, [1,4] : ‘treasure’,…etc}

This was the first time I’ve ever commented my code. I thought it may be a good starting point for anyone who is considering random levels for their project.