Show / Hide Table of Contents

Class HorizontalVerticalTunnelCreator

Implements a tunnel creation algorithm that creates a tunnel that performs all needed vertical movement before horizontal movement, or vice versa (depending on rng).

Inheritance
System.Object
HorizontalVerticalTunnelCreator
Implements
ITunnelCreator
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 HorizontalVerticalTunnelCreator : ITunnelCreator

Constructors

| Improve this Doc View Source

HorizontalVerticalTunnelCreator(IGenerator)

Constructor. Takes rng to use -- if null is specified, the DefaultRNG is used.

Declaration
public HorizontalVerticalTunnelCreator(IGenerator rng = null)
Parameters
Type Name Description
Troschuetz.Random.IGenerator rng

Rng to use -- if null is specified, DefaultRNG is used.

Methods

| Improve this Doc View Source

CreateTunnel(ISettableMapView<Boolean>, Coord, Coord)

Implemnets the algorithm, creating the tunnel as specified in the class description.

Declaration
public void CreateTunnel(ISettableMapView<bool> map, Coord start, Coord end)
Parameters
Type Name Description
ISettableMapView<System.Boolean> map

The map to create the tunnel on.

Coord start

Start coordinate of the tunnel.

Coord end

End coordinate of the tunnel.

| Improve this Doc View Source

CreateTunnel(ISettableMapView<Boolean>, Int32, Int32, Int32, Int32)

Implements the algorithm, creating the tunnel as specified in the class description.

Declaration
public void CreateTunnel(ISettableMapView<bool> map, int startX, int startY, int endX, int endY)
Parameters
Type Name Description
ISettableMapView<System.Boolean> map

The map to create the tunnel on.

System.Int32 startX

X-value of the start position of the tunnel.

System.Int32 startY

Y-value of the start position of the tunnel.

System.Int32 endX

X-value of the end position of the tunnel.

System.Int32 endY

Y-value of the end position of the tunnel.

Implements

ITunnelCreator

Extension Methods

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