Generate 2D cave layouts in JavaScript.