Odd RCoordinates
Data class representing odd-R coordinates in a pointy-topped hexagonal grid layout. The Odd-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 OddRCoordinates class interprets the hexagonal grid using a horizontal row system consistent with odd-R. Here, 'R' aligns with the row, with the origin placed at the top-left.
In this layout, odd rows are offset by half a column value to the left. As one moves vertically in the positive direction, each odd row appears shifted left 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 OddRCoordinates 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.