Module ROT.Map.Arena
The Arena map generator.
Generates an arena style map. All cells except for the extreme borders are floors. The borders are walls.
Functions
init (width, height) | Constructor. |
create (callback) | Create. |
Functions
- init (width, height)
-
Constructor.
Called with ROT.Map.Arena:new(width, height)
Parameters:
- width int Width in cells of the map
- height int Height in cells of the map
- 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.Arena
self
- callback This function will be called for every cell. It must accept the following parameters: