Show / Hide Table of Contents

Class RandomConnectionPointSelector

Implements a the selection algorithm that simply selects random points from the given areas' positions lists, using the RNG specified, or the default rng if null is given.

Inheritance
object
RandomConnectionPointSelector
Implements
IConnectionPointSelector
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: GoRogue.MapGeneration.ConnectionPointSelectors
Assembly: GoRogue.dll
Syntax
public class RandomConnectionPointSelector : IConnectionPointSelector

Constructors

View Source

RandomConnectionPointSelector(IEnhancedRandom?)

Constructor. Specifies the RNG to use, or null if the default RNG should be used.

Declaration
public RandomConnectionPointSelector(IEnhancedRandom? rng = null)
Parameters
Type Name Description
IEnhancedRandom rng

The RNG to use, or null if the default RNG should be used.

Methods

View Source

SelectConnectionPoints(IReadOnlyArea, IReadOnlyArea)

Implements the algorithm. Returns pair of positions -- one position in area1 to use, and on position in area2 to use.

Declaration
public AreaConnectionPointPair SelectConnectionPoints(IReadOnlyArea area1, IReadOnlyArea area2)
Parameters
Type Name Description
IReadOnlyArea area1

First Area to connect.

IReadOnlyArea area2

Second Area to connect.

Returns
Type Description
AreaConnectionPointPair

A pair of positions (one from each Area) to connect.

Implements

IConnectionPointSelector

Extension Methods

Utility.Yield<T>(T)
  • View Source
In this article
Back to top Generated by DocFX