# Cave Generator

var caveData:String = FlxCaveGenerator.generateCaveString(Width, Height, SmoothingIterations, WallRatio);

**Here is what the above code is Doing:**

1. We’re creating a new FlxCaveGenerator object.

2. We’re calling the generateCaveString() method on the FlxCaveGenerator object.

3. We’re passing in the Width, Height, SmoothingIterations, and WallRatio variables to the generateCaveString() method.

4. We’re storing the result of the generateCaveString() method in the caveData variable.

The generateCaveString() method returns a String of 1s and 0s.

The 1s represent walls and the 0s represent empty space.

The generateCaveString() method takes four parameters:

1. Width – The width of the cave in tiles.

2. Height – The height of the cave in tiles.

3. SmoothingIterations – The number of times the cave will be smoothed.

4. WallRatio – The percentage of tiles that will be walls.

The generateCaveString() method returns a String of 1s and 0s.

The 1s represent walls and the 0s represent empty space.

The generateCaveString() method takes four parameters:

1. Width – The width of the cave in tiles.

2. Height – The height of the cave in tiles.

3. SmoothingIterations – The number of times the cave will be smoothed.

4. WallRatio – The percentage of tiles that will be walls.

The generateCaveString() method returns a String of 1s and 0s.

The 1s represent walls and the 0s represent empty space.

The generateCaveString() method takes four parameters:

1. Width – The width of the cave in tiles.

2. Height – The height of the cave in tiles.

3. SmoothingIterations – The number of times the cave will be smoothed.

4. WallRatio – The percentage of tiles that will be walls.

The generateCaveString() method returns a String of 1s and 0s.

The 1s represent walls and the 0s represent empty space.

1. Width – The width of the cave in tiles.

2. Height – The height of the cave in tiles.

3. SmoothingIterations – The number of times the cave will be smoothed.

4. WallRatio – The percentage of tiles that will be walls.

The generateCaveString() method returns a String of 1s and 0s.

The 1s represent walls and the 0s represent empty space.

1. Width – The width of the cave in tiles.

2. Height – The height of the cave in tiles.

3. SmoothingIterations – The number of times the cave will be smoothed.

4. WallRatio – The percentage of tiles that will be walls.

The generateCaveString() method returns a String of 1s and 0s.

The 1s represent walls and the 0s represent empty space.

1. Width – The width of the cave in tiles.

2. Height – The height of the cave in tiles.

3. SmoothingIterations – The number of times the cave will be smoothed.

4. WallRatio – The percentage of tiles that will be walls.

The generateCaveString() method returns a String of 1s and 0s.

The 1s represent walls and the 0s represent empty space.

The generateCaveString() method takes four parameters:

1. Width – The width of