Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Nested class: RT.Coordinates.PentaCell.Grid

Summary

Describes a 2D grid of pentagonal cells with thin rhombuses filling the gaps.

Constructors

Grid(IEnumerable<PentaCell> cells, IEnumerable<Link<PentaCell>> links = null, Func<PentaCell, IEnumerable<PentaCell>> getNeighbors = null)
See Structure<TCell>(IEnumerable<TCell>, IEnumerable<Link<TCell>>, Func<TCell, IEnumerable<TCell>>).
Grid(int levels)
Constructs a PentaCell.Grid that forms a symmetric structure (actually a decagon if levels is large enough).

Instance methods

voidAdds the specified cells to this structure.
void
AddCells(params PentaCell[] cells)
void
AddCells(IEnumerable<PentaCell> cells)
voidAdds the specified link to this structure.
voidAdds a link between the specified cells to this structure.
void
AddLinks(params Link<PentaCell>[] links)
Adds the specified links to this structure.
void
AddLinks(IEnumerable<Link<PentaCell>> links)
Structure<CombinedCell<PentaCell>>
CombineCells(params PentaCell[] cells)
Returns a new structure in which the specified set of cells is combined (merged) into a single cell. (see also remarks)
Structure<CombinedCell<PentaCell>>
CombineCells(IEnumerable<PentaCell> cells)
boolDetermines whether this structure contains the specified cell.
IEnumerable<PentaCell> Finds the shortest path from the specified from cell to the specified to cell.
Dictionary<PentaCell, CellWithDistance<PentaCell>> Finds the shortest path from the specified origin cell to every other cell in the structure.
PentaCell.Grid
GenerateMaze(Random rnd = null, MazeBias bias = MazeBias.Default)
See Structure<TCell>.GenerateMaze(Random, MazeBias).
PentaCell.Grid
GenerateMaze(Func<int, int, int> rndNext, MazeBias bias = MazeBias.Default)
See Structure<TCell>.GenerateMaze(Func<int, int, int>, MazeBias).
boolDetermines whether the specified link is traversible.
bool
IsLink(PentaCell cell1, PentaCell cell2)
Determines whether a direct link between the specified cells exists in this structure and is traversible.
voidRemoves the specified cell from this structure.
void
RemoveCells(params PentaCell[] cells)
Removes the specified cells from this structure.
void
RemoveCells(IEnumerable<PentaCell> cells)
void
RemoveCells(Predicate<PentaCell> predicate)
Removes all cells from this structure that match the specified predicate.
voidRemoves the specified link from this structure.
void
RemoveLinks(params Link<PentaCell>[] links)
Removes the specified links from this structure.
void
RemoveLinks(IEnumerable<Link<PentaCell>> links)
void
RemoveLinks(Predicate<Link<PentaCell>> predicate)
string
Svg(SvgInstructions inf = null)
Returns an SVG file that visualizes this structure.

Instance properties

IEnumerable<PentaCell>Returns this structure’s full set of cells.
IEnumerable<Link<PentaCell>>Returns the full set of links between the cells in this structure.