Module ROT.Map.Uniform
The Uniform Map Generator.
See http://www.roguebasin.roguelikedevelopment.org/index.php?title=Dungeon-Building_Algorithm.
Functions
init (width, height[, options[, rng={4]]) | Constructor. |
create (callback) | Create. |
Functions
- init (width, height[, options[, rng={4]])
-
Constructor.
Called with ROT.Map.Uniform:new()
Parameters:
- width int Width in cells of the map
- height int Height in cells of the map
- options Options
- rng userdata Userdata with a .random(self, min, max) function
- create (callback)
-
Create.
Creates a map.
Parameters:
- callback This function will be called for every cell. It must accept the following parameters:
- x int The x-position of a cell in the map
- y int The y-position of a cell in the map
- value int A value representing the cell-type. 0==floor, 1==wall
Returns:
-
ROT.Map.Uniform
self
- callback This function will be called for every cell. It must accept the following parameters: