Class MazeGenerator
Generates a maze, and adds it to the given map.
Inheritance
System.Object
MazeGenerator
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: GoRogue.MapGeneration.Generators
Assembly: GoRogue.dll
Syntax
public static class MazeGenerator
Methods
| Improve this Doc View SourceGenerate(ISettableMapView<Boolean>, Int32)
Generates a maze in map using crawlers that walk the map carving tunnels.
Declaration
public static IEnumerable<MapArea> Generate(ISettableMapView<bool> map, int crawlerChangeDirectionImprovement = 10)
Parameters
Type | Name | Description |
---|---|---|
ISettableMapView<System.Boolean> | map | The map to modify. |
System.Int32 | crawlerChangeDirectionImprovement | Out of 100, how much to increase the chance of the crawler changing direction each step. Once it changes direction, the chance resets to 0 and increases by this amount. Defaults to 10. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<MapArea> | A list of mazes that were generated. |
Generate(ISettableMapView<Boolean>, IGenerator, Int32)
Generates a maze in map using crawlers that walk the map carving tunnels.
Declaration
public static IEnumerable<MapArea> Generate(ISettableMapView<bool> map, IGenerator rng, int crawlerChangeDirectionImprovement = 10)
Parameters
Type | Name | Description |
---|---|---|
ISettableMapView<System.Boolean> | map | The map to modify. |
Troschuetz.Random.IGenerator | rng | The RNG to use. |
System.Int32 | crawlerChangeDirectionImprovement | Out of 100, how much to increase the chance of the crawler changing direction each step. Once it changes direction, the chance resets to 0 and increases by this amount. Defaults to 10. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<MapArea> | A list of mazes that were generated. |