Even RCoordinates
Data class representing even-R coordinates in a pointy-topped hexagonal grid layout. The Even-R coordinate system uses a 2D grid representation (column and row) differing from the cube coordinate system utilized in the HexCoordinates class:
The HexCoordinates class maps hexagonal grid coordinates using three axes q, r, s, forming a cube structure.
Conversely, the EvenRCoordinates class interprets the hexagonal grid using a horizontal row system consistent with even-R. Here, 'R' aligns with the row, with the origin placed at the top-left.
In this layout, even rows are offset by half a column value. As one moves vertically in the positive direction, each even row appears shifted right to the midway of the adjacent columns.
The col attribute denotes the column, whereas the row signifies the row (which aligns with the r-axis in cube coordinates).
The EvenRCoordinates can be particularly advantageous when working with graphical representations or user interface elements, where Cartesian coordinates (column and row) would be more straightforward and convenient.
Properties
Expects a property of HexCoordinates type, which should be provided by instances of this interface.
Functions
Transforms the given this from HexCoordinates into the corresponding subtype of Coordinates.