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
System.Object
RandomConnectionPointSelector
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: GoRogue.MapGeneration.Connectors
Assembly: GoRogue.dll
Syntax
public class RandomConnectionPointSelector : IAreaConnectionPointSelector
Constructors
| Improve this Doc View SourceRandomConnectionPointSelector(IGenerator)
Constructor. Specifies the RNG to use, or null if the default RNG should be used.
Declaration
public RandomConnectionPointSelector(IGenerator rng = null)
Parameters
Type | Name | Description |
---|---|---|
Troschuetz.Random.IGenerator | rng | The RNG to use, or null if the default RNG should be used. |
Methods
| Improve this Doc View SourceSelectConnectionPoints(IReadOnlyMapArea, IReadOnlyMapArea)
Selects and returns a random point from each map area's positions list.
Declaration
public Tuple<Coord, Coord> SelectConnectionPoints(IReadOnlyMapArea area1, IReadOnlyMapArea area2)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyMapArea | area1 | First map area to connect. |
IReadOnlyMapArea | area2 | Second area to connect |
Returns
Type | Description |
---|---|
System.Tuple<Coord, Coord> | A tuple containing the selected positions. |