DoubleHeightCoordinates

Represents a double height coordinate in the hexagonal grid layout, which doubles the row step size. Use in a flat top hex layout, the row is increased by 2 for each hex.

Constraint: (col + row) % 2 == 0

Constructors

Link copied to clipboard
constructor(col: Int, row: Int)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val col: Int

Column of the coordinate.

Link copied to clipboard
open override val hex: HexCoordinates

Expects a property of HexCoordinates type, which should be provided by instances of this interface.

Link copied to clipboard
Link copied to clipboard
open override val q: Int

The column coordinate of the point on the hexagonal grid.

Link copied to clipboard
open override val r: Int

The row coordinate of the point on the hexagonal grid.

Link copied to clipboard
val row: Int

Row of the coordinate.

Functions

Link copied to clipboard
operator fun get(int: Int): DoubleHeightCoordinates
Link copied to clipboard

Transforms the given this from HexCoordinates into the corresponding subtype of Coordinates.

Link copied to clipboard
Link copied to clipboard