An irregular hex grid, where the rows have different lengths and irregular start row coordinates. This is backed by an Array[Int]. The length of this Array is twice the number of tile rows in the grid. Each row from lowest to highest has two values length of the row in the number of tile centres HCens and the rTileMin coordinate for the row.
- Value parameters:
- tileRowsStartEnd
the Array contains 2 values per Tile Row, the cStart Tile and the cEnd Tile
- yTileMin
The y value for the bottom tile row of the TileGrid
- Constructor:
creates a new HexGridIrr with a defined grid.
- Companion:
- object
Document{}
The bottom, lowest or minimum Side Row of this TileGrid. The r value, the row number value.
The bottom, lowest or minimum Side Row of this TileGrid. The r value, the row number value.
- Inherited from:
- TGrid
The Hex Sides of the Hex Grid defined in integer constructed LineSegHC..
The Hex Sides of the Hex Grid defined in integer constructed LineSegHC..
- Inherited from:
- HGrid
Foreachs over each Row of Sides. Users will not normally need to use this method directly.
Foreachs over each Row of Sides. Users will not normally need to use this method directly.
- Inherited from:
- TGrid
This gives the all tile grid lines in a single colour and line width.
This gives the all tile grid lines in a single colour and line width.
- Inherited from:
- TGrid
foreach Hex side's coordinate HSide, calls the effectfull function.
foreach Hex side's coordinate HSide, calls the effectfull function.
- Inherited from:
- HGrid
The top, highest or maximum Side Row of this TileGrid. The r value, the row number.
The top, highest or maximum Side Row of this TileGrid. The r value, the row number.
- Inherited from:
- TGrid
Value members
Concrete methods
The HCenOrSide coordinate centre for this hex grid.
The HCenOrSide coordinate centre for this hex grid.
- Definition Classes
The total number of hex tiles in the tile Grid. This is determined from the unsafeRowsArray
The total number of hex tiles in the tile Grid. This is determined from the unsafeRowsArray
- Definition Classes
The start (or by default left column) of the tile centre of the given row. Will throw on illegal values.
The start (or by default left column) of the tile centre of the given row. Will throw on illegal values.
- Definition Classes
The end (or by default right) column number of the tile centre of the given row. Will throw on illegal values.
The end (or by default right) column number of the tile centre of the given row. Will throw on illegal values.
- Definition Classes
Gives the index into an Arr / Array of Tile data from its tile HCen. Use sideIndex and vertIndex methods to access Side and Vertex Arr / Array data.
Inherited methods
The active tiles without any PaintElems.
The active tiles without any PaintElems.
- Inherited from:
- HGrid
Combine adjacent tiles of the same value.
Combine adjacent tiles of the same value.
- Inherited from:
- HGrid
Gives the index into an Arr / Array of Tile data from its tile HCen. Use sideIndex and vertIndex methods to access Side and Vertex Arr / Array data.
The centre of the hex grid in terms of c column coordinates.
The centre of the hex grid in terms of c column coordinates.
- Inherited from:
- TGrid
Is the specified tile centre row empty?
Is the specified tile centre row empty?
- Inherited from:
- HGrid
The centre point as a Vec2. Not sure why this id implemented here.
The centre point as a Vec2. Not sure why this id implemented here.
- Inherited from:
- TGrid
flatMaps from all hex tile centre coordinates to an Arr of type ArrT. The elements of this array can not be accessed from this grid class as the TileGrid structure is lost in the flatMap operation.
flatMaps from all hex tile centre coordinates to an Arr of type ArrT. The elements of this array can not be accessed from this grid class as the TileGrid structure is lost in the flatMap operation.
- Inherited from:
- HGrid
flatMaps over each row number.
flatMaps over each row number.
- Inherited from:
- TGrid
H cost for A* path finding. To move 1 tile has a cost 2. This is because the G cost or actual cost is the sum of the terrain cost of tile of departure and the tile of arrival.
H cost for A* path finding. To move 1 tile has a cost 2. This is because the G cost or actual cost is the sum of the terrain cost of tile of departure and the tile of arrival.
- Inherited from:
- HGrid
Boolean. True if the HCen hex centre exists in this hex grid.
Boolean. True if the HCen hex centre exists in this hex grid.
- Inherited from:
- HGridBased
Maps over the HCen hex centre tile coordinates. B is used rather than A as a type parameter, as this method maps from HCen => B, corresponding to the standard Scala map function of A => B.
Creates a new HCenArrOfBuff An [[HCen] hex tile centre corresponding Arr of empty ArrayBuffers of the given or inferred type.
Creates a new HCenArrOfBuff An [[HCen] hex tile centre corresponding Arr of empty ArrayBuffers of the given or inferred type.
- Inherited from:
- HGrid
New Tile immutable Tile Arr of Opt data values.
New Tile immutable Tile Arr of Opt data values.
- Inherited from:
- HGrid
The centre of the hex grid in terms of r row coordinates.
The centre of the hex grid in terms of r row coordinates.
- Inherited from:
- TGrid
Gives the text graphics for the row and column of each tile centre.
Gives the text graphics for the row and column of each tile centre.
- Inherited from:
- TGrid
Gives the index into an Arr / Array of Tile data from its tile HCen. Use sideIndex and vertIndex methods to access Side and Vertex Arr / Array data.
The bottom or lowest tile side row, r coordinate.
The bottom or lowest tile side row, r coordinate.
- Inherited from:
- TGrid
The top of highest tile side row, r coordinate.
The top of highest tile side row, r coordinate.
- Inherited from:
- TGrid
The centre of this grid in the X axis. this will be equal to the cCen Int value.
The centre of this grid in the X axis. this will be equal to the cCen Int value.
- Inherited from:
- TGrid