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
object
HorizontalVerticalTunnelCreator
Implements
ITunnelCreator
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: GoRogue.MapGeneration.TunnelCreators
Assembly: GoRogue.dll
Syntax
public class HorizontalVerticalTunnelCreator : ITunnelCreator

Constructors

View Source

HorizontalVerticalTunnelCreator(IEnhancedRandom?)

Creates a new tunnel creator.

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

RNG to use for movement selection.

Methods

View Source

CreateTunnel(ISettableGridView<bool>, Point, Point)

Implements the algorithm, creating the tunnel between the two points (ensuring there is a path of positions set to true between those two points).

Declaration
public Area CreateTunnel(ISettableGridView<bool> map, Point tunnelStart, Point tunnelEnd)
Parameters
Type Name Description
ISettableGridView<bool> map

_grid to create the tunnel on.

Point tunnelStart

Start position to connect.

Point tunnelEnd

End position to connect.

Returns
Type Description
Area

An area containing all points that are part of the tunnel.

View Source

CreateTunnel(ISettableGridView<bool>, int, int, int, int)

Implements the algorithm, creating the tunnel between the two points (ensuring there is a path of positions set to true between those two points).

Declaration
public Area CreateTunnel(ISettableGridView<bool> map, int startX, int startY, int endX, int endY)
Parameters
Type Name Description
ISettableGridView<bool> map

_grid to create the tunnel on.

int startX

X-value of the start position to connect.

int startY

Y-value of the start position to connect.

int endX

X-value of the end position to connect.

int endY

Y-value of the end position to connect.

Returns
Type Description
Area

An area containing all points that are part of the tunnel.

Implements

ITunnelCreator

Extension Methods

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