Skip to content

DungeonRoom

namespace Griff.Modules.Dungeons;
public struct DungeonRoom

A room of a DungeonGenerator’s dungeon: the cells of its floor, from its top-left cell.

public ValueTuple<int, int> Center { get; }

The cell in its middle (the nearer the top left when it’s an even number of cells).

public int Height { get; init; }
public int Width { get; init; }
public int X { get; init; }
public int Y { get; init; }
public bool Contains(int x, int y)

True if cell (x, y) is on its floor.

public void Deconstruct(out int X, out int Y, out int Width, out int Height)
public override bool Equals(object obj)
public bool Equals(DungeonRoom other)
public override int GetHashCode()
public bool Overlaps(DungeonRoom other, int margin = 0)

True if it and other share a cell, or would with margin more cells round it.

public override string ToString()