Creates a new DrunkardsWalk Generator
Generator Config
Clear previously captured snapshots.
Sets the map values to match a given table. A shallow copy is made from the given table.
Returns # of walked tiles / # of total tiles.
number - Between 0.0 and 1.0
Returns the internal map.
Returns a list of paths previously walked.
Vector2[][]
Returns previously captured snapshots.
Takes a snapshot of the current map state. These can be retrieved through getSnapshots()
Generate a path by walking a number of steps. Can be called multiple times to have the Drunkard 'jump' to a different spot.
The walk configuration
number - Stops walking if this much of the map is explored. Range [0.0, 1.0], default 1.0
Vector2 - The starting position. Default random.
number - The maximum number of steps to take for each walk (exclusive)
number - The minimum number of steps to take for each walk (inclusive)
Vector2[][] - The paths walked
Generated using TypeDoc
Generator to perform a Drunkard's Walk