hex-grid Documentation Beta

Classes

Cell

Represents single position in a grid

Hex​Grid

HexGrid is an entry point of the package. It represents a grid of hexagonal cells

Structures

Invalid​Arguments​Error
Attribute

A type-erased Codable value.

Attribute​Decodable

A type-erased Decodable value.

Attribute​Encodable

A type-erased Encodable value.

Axial​Coordinates

Represents coordinates in Axial format using q, r axis. q - you can imagine as a column r - you can imagine as a row

Cube​Coordinates

Represents coordinates in Cube format using x, y and z axis

Cube​Fractional​Coordinates

Represents coordinates in Cube format using x, y and z axis

Offset​Coordinates

Represents coordinates in Offset format using column and row.

Hex​Size
Point

Enumerations

Direction

Enumeration for direction

Direction.​Flat

⬣ - flat side on top of a hexagon individual cases correspond to common cardinal directions (east and west directions are not available for flat on top orientation)

Direction.​Pointy

⬢ - pointy side on top of a hexagon individual cases correspond to common cardinal directions (north and south directions are not available for pointy on top orientation)

Grid​Shape

Enumeration for hexagonal grid shapes

Offset​Layout

Enumeration for hexagonal grid offset layout

Orientation

Enumeration for hexagon orientation

Rotation

Rotation Enumeration for hexagonal grid shapes