HGridReg

class HGridReg(val bottomCenRow: Int, val topCenRow: Int, val leftCenCol: Int, val rightCenCol: Int) extends HGrid

A Regular hex grid where the tile rows have the same length, except the tile rows where r %% 4 == 2 may differ in length by 1 from tile rows where r %% 4 == 0 rows.

Companion:
object
trait HGrid
trait TGrid
class Object
trait Matchable
class Any

Document{}

final def bottomSideRow: Int

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
final def numOfSideRows: Int

The number of Rows of Sides.

The number of Rows of Sides.

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
final def sidesDraw(colour: Colour, lineWidth: Double): LinesDraw

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
final def sidesFlatMap[ArrT <: SeqImut[_]](f: HSide => ArrT)(implicit build: ArrFlatBuilder[ArrT]): ArrT

maps over each Hex Side's coordinate HSide in the given Row.

maps over each Hex Side's coordinate HSide in the given Row.

Inherited from:
HGrid
final def sidesForeach(f: HSide => Unit): Unit

foreach Hex side's coordinate HSide, calls the effectfull function.

foreach Hex side's coordinate HSide, calls the effectfull function.

Inherited from:
HGrid
final def sidesMap[B, ArrT <: SeqImut[B]](f: HSide => B)(implicit build: ArrBuilder[B, ArrT]): ArrT

maps over each Hex Side's coordinate HSide in the given Row.

maps over each Hex Side's coordinate HSide in the given Row.

Inherited from:
HGrid
final def topSideRow: Int

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

def arrIndex(r: Int, c: Int): Int

Gives the index into an Arr / Array of Tile data from its HCen hex tile centre coordinate. Use sideIndex and vertIndex methods to access Side and Vertex Arr / Array data.

Gives the index into an Arr / Array of Tile data from its HCen hex tile centre coordinate. Use sideIndex and vertIndex methods to access Side and Vertex Arr / Array data.

The bottom, lowest or minimum row r value for tile centre rows where r.Div4Rem0, r %% 4 == 0.

The bottom, lowest or minimum row r value for tile centre rows where r.Div4Rem0, r %% 4 == 0.

The bottom, lowest or minimum row r value for tile centre rows where r.Div4Rem2, r %% 4 == 2.

The bottom, lowest or minimum row r value for tile centre rows where r.Div4Rem2, r %% 4 == 2.

The number of tile sides in the bottom side row of the hex grid.

The number of tile sides in the bottom side row of the hex grid.

override def coordCen: HCenOrSide

The HCenOrSide coordinate centre for this hex grid.

The HCenOrSide coordinate centre for this hex grid.

Definition Classes
def hCenExists(r: Int, c: Int): Boolean
override def height: Double
Definition Classes
override def numRow0s: Int
Definition Classes
override def numRow2s: Int
Definition Classes
override def numTileRows: Int
Definition Classes
override def numTiles: Int
Definition Classes

The end maximum or by convention right column coordinate, or c value for tile centre rows where r.Div4Rem0. This property is only available on regular hex grids HGrids, as this value is not fixed on irregular hex grids.

The end maximum or by convention right column coordinate, or c value for tile centre rows where r.Div4Rem0. This property is only available on regular hex grids HGrids, as this value is not fixed on irregular hex grids.

The starting, minimum or by convention left column coordinate c value for tile centre rows where r.Div4Rem0. This property is only available on regular hex grids HGrids, as this value is not fixed on irregular hex grids.

The starting, minimum or by convention left column coordinate c value for tile centre rows where r.Div4Rem0. This property is only available on regular hex grids HGrids, as this value is not fixed on irregular hex grids.

The number of tiles or tile centres in rows where r.Div4Rem0.

The number of tiles or tile centres in rows where r.Div4Rem0.

The end, maximum or by convention right column coordinate or c value for tile centre rows where r.Div4Rem2. This property is only available on regular hex grids HGrids, as this value is not fixed on irregular hex grids.

The end, maximum or by convention right column coordinate or c value for tile centre rows where r.Div4Rem2. This property is only available on regular hex grids HGrids, as this value is not fixed on irregular hex grids.

The start minimum or by convention left column or c value for tile centre rows where r.Div4Rem2. This property is only available on regular hex grids HGrids, as this value is not fixed on irregular hex grids.

The start minimum or by convention left column or c value for tile centre rows where r.Div4Rem2. This property is only available on regular hex grids HGrids, as this value is not fixed on irregular hex grids.

The number of tiles or tile centres in rows where r.Div4Rem2.

The number of tiles or tile centres in rows where r.Div4Rem2.

override def rowCenLeft(row: Int): Int
Definition Classes
override def rowCenRight(row: Int): Int
Definition Classes
override def rowForeach(r: Int)(f: HCen => Unit): Unit

foreachs over each Tile's Roord in the given Row. The row is specified by its r value.

foreachs over each Tile's Roord in the given Row. The row is specified by its r value.

Definition Classes
override def rowForeachSide(r: Int)(f: HSide => Unit): Unit
Definition Classes
override def rowIForeach(r: Int, startCount: Int)(f: (HCen, Int) => Unit): Int

foreachs over each Tile's Roord in the given Row. The row is specified by its r value.

foreachs over each Tile's Roord in the given Row. The row is specified by its r value.

Definition Classes
override def rowNumTiles(row: Int): Int
Definition Classes
override def sideArrIndex(r: Int, c: Int): Int

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.

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.

Definition Classes
override def sideRowIndexArray: Array[Int]

Array of indexs for Side data Arrs giving the index value for the start of each side row.

Array of indexs for Side data Arrs giving the index value for the start of each side row.

Definition Classes

The top, highest or maximum row r value for tile centres rows where r.Div4Rem0, r %% 4 == 0.

The top, highest or maximum row r value for tile centres rows where r.Div4Rem0, r %% 4 == 0.

The top, highest or maximum row r value for tile centre rows where r.Div4Rem2, r %% 4 == 2.

The top, highest or maximum row r value for tile centre rows where r.Div4Rem2, r %% 4 == 2.

The number of tile sides in the top side row of the hex grid.

The number of tile sides in the top side row of the hex grid.

override def width: Double
Definition Classes

The bottom point of the grid.

The bottom point of the grid.

The right most point of the grid.

The right most point of the grid.

The top point of the grid.

The top point of the grid.

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
final def arrIndex(hc: HCen): Int

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.

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 from:
HGrid
final override def bottom: Double
Definition Classes
Inherited from:
HGrid
def cCen: Int

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
final def cenRowEmpty(row: Int): Boolean

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
Inherited from:
HGrid
def findPath(startRoord: HCen, endRoord: HCen)(fTerrCost: (HCen, HCen) => OptInt): Option[List[HCen]]
Inherited from:
HGrid
final def flatMap[ArrT <: SeqImut[_]](f: HCen => ArrT)(implicit build: ArrFlatBuilder[ArrT]): ArrT

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
final def flatMapRows[ArrT <: SeqImut[_]](f: Int => ArrT)(implicit build: ArrFlatBuilder[ArrT]): ArrT

flatMaps over each row number.

flatMaps over each row number.

Inherited from:
TGrid
final def foldRows[B](init: B)(f: (B, Int) => B): B

foldLefts over each row number.

foldLefts over each row number.

Inherited from:
TGrid
final def foreach(f: HCen => Unit): Unit

foreachs over each HCen hex tile centre, applying the side effecting function.

foreachs over each HCen hex tile centre, applying the side effecting function.

Inherited from:
HGrid
override def foreachCenCoord(f: TileCoord => Unit): Unit
Definition Classes
Inherited from:
HGrid
final def foreachRow(f: Int => Unit): Unit

Foreach grid Row y coordinate.

Foreach grid Row y coordinate.

Inherited from:
TGrid
def fullDisplayScale(dispWidth: Double, dispHeight: Double, padding: Double): Double
Inherited from:
TGrid
def getHCost(startRoord: HCen, endRoord: HCen): Int

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
final def hCenExists(hc: HCen): Boolean

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
final def iForeach(f: (HCen, Int) => Unit): Unit

foreachs with index over each HCen hex tile centre, apply the side effecting function.

foreachs with index over each HCen hex tile centre, apply the side effecting function.

Inherited from:
HGrid
final override def left: Double
Definition Classes
Inherited from:
HGrid
final def map[B, ArrB <: SeqImut[B]](f: HCen => B)(implicit build: ArrBuilder[B, ArrB]): ArrB

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.

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.

Inherited from:
HGrid
def mapCenCoords[B, BB <: SeqImut[B]](f: TileCoord => B)(implicit build: ArrBuilder[B, BB]): BB
Inherited from:
TGrid
final def mapRows[B, BB <: SeqImut[B]](f: Int => B)(implicit build: ArrBuilder[B, BB]): BB

maps over each row number.

maps over each row number.

Inherited from:
TGrid
final def newHCenArrOfBuff[A <: AnyRef](implicit ct: ClassTag[A]): HCenArrOfBuff[A]

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
final def newTileArr[A <: AnyRef](value: A)(implicit ct: ClassTag[A]): HCenArr[A]

New immutable Arr of Tile data.

New immutable Arr of Tile data.

Inherited from:
HGrid
final def newTileArrArr[A <: AnyRef](implicit ct: ClassTag[A]): HCenArrArr[A]

New immutable Arr of Tile data.

New immutable Arr of Tile data.

Inherited from:
HGrid
final def newTileArrOpt[A <: AnyRef](implicit ct: ClassTag[A]): HCenArrOpt[A]

New Tile immutable Tile Arr of Opt data values.

New Tile immutable Tile Arr of Opt data values.

Inherited from:
HGrid
final def numOfVertRows: Int

The number of Rows of vertices.

The number of Rows of vertices.

Inherited from:
TGrid
def rCen: Int

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
final override def right: Double
Definition Classes
Inherited from:
HGrid
final def sideArrIndex(hc: HSide): Int

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.

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 from:
HGrid
override def sideLines: LineSegs
Definition Classes
Inherited from:
HGrid
final def sideRowBottom: Int

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
final override def top: Double
Definition Classes
Inherited from:
HGrid

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
final override def yCen: Double

The centre of the hex grid along the Y axis after the yRatio has been applied to the r row value.

The centre of the hex grid along the Y axis after the yRatio has been applied to the r row value.

Definition Classes
Inherited from:
HGrid
override def yRatio: Double

The conversion factor for c column tile grid coordinates. 1.0 / sqrt(3).

The conversion factor for c column tile grid coordinates. 1.0 / sqrt(3).

Definition Classes
Inherited from:
HGrid

Concrete fields

final override val numSides: Int