GridOffset class

Rather impractical representation of a hexagon in a hexagonal grid, positioned by q (column) and r (row) coordinates. "Zero" hexagon is in the top left corner. Odd rows (columns) are shifted to the right (down). See https://www.redblobgames.com/grids/hexagons/#coordinates for more information.

Constructors

GridOffset(int q, int r)

Properties

hashCode int
The hash code for this object.
no setteroverride
q int
final
r int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toCube({GridLayout gridLayout = GridLayout.POINTY_TOP}) Cube
Converts this offset to a Cube coordinate, using the given GridLayout.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override