The Cursed Labyrinth
|
Backing 2D grid for dungeon generation and queries. More...
Public Member Functions | |
DungeonGrid (int w, int h) | |
Create a grid initialized to wall. | |
bool | IsRectClearWithMargin (RectInt r, int margin) |
Is every cell in rect still solid "wall"? | |
void | CarveRoom (RectInt r, string floorKind) |
Carve a rectangular area as a spec floor kind. | |
bool | InBounds (int x, int y) |
Check bounds. | |
void | EnsureRoomId () |
Allocate/clear RoomId map. |
Public Attributes | |
readonly int | Width |
readonly int | Height |
readonly string[,] | Kind |
Properties | |
int[,] | RoomId [get] |
Integer room index per cell. -1 = corridor/none. Sized [Width,Height]. |
Backing 2D grid for dungeon generation and queries.
Backing 2D grid for dungeon generation and queries.
DungeonGrid.DungeonGrid | ( | int | w, |
int | h ) |
Create a grid initialized to wall.
void DungeonGrid.CarveRoom | ( | RectInt | r, |
string | floorKind ) |
Carve a rectangular area as a spec floor kind.
void DungeonGrid.EnsureRoomId | ( | ) |
Allocate/clear RoomId map.
bool DungeonGrid.InBounds | ( | int | x, |
int | y ) |
Check bounds.
bool DungeonGrid.IsRectClearWithMargin | ( | RectInt | r, |
int | margin ) |
Is every cell in rect still solid "wall"?
readonly int DungeonGrid.Height |
readonly string [,] DungeonGrid.Kind |
readonly int DungeonGrid.Width |
|
get |
Integer room index per cell. -1 = corridor/none. Sized [Width,Height].