The Cursed Labyrinth
Loading...
Searching...
No Matches
DungeonGrid Class Referencesealed

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].

Detailed Description

Backing 2D grid for dungeon generation and queries.

Backing 2D grid for dungeon generation and queries.

Constructor & Destructor Documentation

◆ DungeonGrid()

DungeonGrid.DungeonGrid ( int w,
int h )

Create a grid initialized to wall.

Member Function Documentation

◆ CarveRoom()

void DungeonGrid.CarveRoom ( RectInt r,
string floorKind )

Carve a rectangular area as a spec floor kind.

◆ EnsureRoomId()

void DungeonGrid.EnsureRoomId ( )

Allocate/clear RoomId map.

◆ InBounds()

bool DungeonGrid.InBounds ( int x,
int y )

Check bounds.

◆ IsRectClearWithMargin()

bool DungeonGrid.IsRectClearWithMargin ( RectInt r,
int margin )

Is every cell in rect still solid "wall"?

Member Data Documentation

◆ Height

readonly int DungeonGrid.Height

◆ Kind

readonly string [,] DungeonGrid.Kind

◆ Width

readonly int DungeonGrid.Width

Property Documentation

◆ RoomId

int [,] DungeonGrid.RoomId
get

Integer room index per cell. -1 = corridor/none. Sized [Width,Height].


The documentation for this class was generated from the following file: