Skip to content

WallRoom

namespace Griff.Scenes;
public sealed class WallRoom

One room a WallRooms found: an id it keeps as walls change, its cells (top row first, left to right), its area and whether it’s open to the outside. A new one is made each time the rooms change, so keep its id rather than it.

public int Area { get; }

How many cells it has.

public IReadOnlyList<ValueTuple<int, int>> Cells { get; }

Its cells of the map, top row first, left to right.

public bool Closed { get; }

True if walls close it off all round: not Open.

public int Id { get; }

Its number, from 1, kept as walls go up and come down (see WallRooms).

public bool Open { get; }

True if it reaches the outside: past the map’s edge, or an empty cell with EmptyIsOutside.

public override string ToString()