SqCenArrOpt

final class SqCenArrOpt[A <: AnyRef](val unsafeArr: Array[A]) extends AnyVal with TileArrOpt[A]

An immutable Arr of Opt Tile data for a specific square tile grid SqGrid. This is specialised for OptRef[A]. The tileGrid can map the SqCen coordinate of the tile to the index of the Arr. Hence most methods take an implicit SqGrid square grid parameter.

trait TileArrOpt[A]
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def cMapNones[B, ArrT <: SeqImut[B]](f: SqCen => B)(implicit grid: SqGrid, build: ArrBuilder[B, ArrT]): ArrT

Coordinate map Nones. Map the None values respective SqCen coordinates of this SqCenArrOpt to type B, the first type parameter. Returns an immutable Array based collection of type ArrT, the second type parameter.

Coordinate map Nones. Map the None values respective SqCen coordinates of this SqCenArrOpt to type B, the first type parameter. Returns an immutable Array based collection of type ArrT, the second type parameter.

def keyMap(implicit grid: SqGrid): Map[A, SqCen]
def mutMove(s1: SqCen, s2: SqCen)(implicit grid: SqGrid): Unit

Moves the object in the array location given by HCen1 to HCen2, by setting H2 to the value of h1 and setting H1 to null.

Moves the object in the array location given by HCen1 to HCen2, by setting H2 to the value of h1 and setting H1 to null.

def scSomesForeach(f: (SqCen, A) => Unit)(implicit grid: SqGrid): Unit

coordinate-foreach-Some. Foreach Some element and its associated HCen coordinate applies the side effecting parameter function. It ignores the None values.

coordinate-foreach-Some. Foreach Some element and its associated HCen coordinate applies the side effecting parameter function. It ignores the None values.

def scSomesMap[B, ArrB <: SeqImut[B]](f: (SqCen, A) => B)(implicit grid: SqGrid, build: ArrBuilder[B, ArrB]): ArrB

SqCen with Some map. map the Some values of this HcenArrOpt, with the respective SqCen coordinate to type B, the first type parameter B. Returns an immutable Array based collection of type ArrT, the second type parameter.

SqCen with Some map. map the Some values of this HcenArrOpt, with the respective SqCen coordinate to type B, the first type parameter B. Returns an immutable Array based collection of type ArrT, the second type parameter.

def setNone(hc: SqCen)(implicit grid: SqGrid): SqCenArrOpt[A]

Creates a new ArrOpt with the specified location set to NoRef.

Creates a new ArrOpt with the specified location set to NoRef.

def setSome(y: Int, c: Int, value: A)(implicit grid: SqGrid): Unit

Sets the Some value of the square tile data at the specified row and column coordinate values. This is an imperative mutating operation.

Sets the Some value of the square tile data at the specified row and column coordinate values. This is an imperative mutating operation.

def setSome(sc: SqCen, value: A)(implicit grid: SqGrid): SqCenArrOpt[A]

Creates a new ArrOpt with the specified location set to the specified value.

Creates a new ArrOpt with the specified location set to the specified value.

def setSomes(triples: (Int, Int, A)*)(implicit grid: SqGrid): Unit

Sets the Some values of the hex tile data at the specified row and column coordinate values. This is an imperative mutating operation.

Sets the Some values of the hex tile data at the specified row and column coordinate values. This is an imperative mutating operation.

def some2sMap[B <: AnyRef, C, ArrC <: SeqImut[C]](optArrB: SqCenArrOpt[B])(f: (A, B) => C)(implicit grid: SqGrid, build: ArrBuilder[C, ArrC]): ArrC

Maps the Somes of this HCenArrOpt and the Some values of a second HCenArrOpt. Returns an immutable Array based collection of type ArrC, the second type parameter.

Maps the Somes of this HCenArrOpt and the Some values of a second HCenArrOpt. Returns an immutable Array based collection of type ArrC, the second type parameter.

def tileNone(sc: SqCen)(implicit grid: SqGrid): Boolean

The tile is a None at the given hex grid centre coordinate HCen.

The tile is a None at the given hex grid centre coordinate HCen.

def unSafeApply(sc: SqCen)(implicit grid: SqGrid): A

Accesses element from Refs Arr. Only use this method where you are certain it is not null, or the consumer can deal with the null.

Accesses element from Refs Arr. Only use this method where you are certain it is not null, or the consumer can deal with the null.

def unsafeMove(sc1: SqCen, sc2: SqCen)(implicit grid: SqGrid): Unit

Moves the object in the array location given by the 1st SqCen to the 2nd SqCen, by setting sc2 to the value of sc1 and setting sc1 to None.

Moves the object in the array location given by the 1st SqCen to the 2nd SqCen, by setting sc2 to the value of sc1 and setting sc1 to None.

Inherited methods

def foldSomes[B](init: B)(f: (B, A) => B): B
Inherited from:
TileArrOpt
def length: Int
Inherited from:
TileArrOpt
def map[B, ArrT <: SeqImut[B]](noneValue: => B)(f: A => B)(implicit build: ArrBuilder[B, ArrT]): ArrT

Maps the this Arr of Opt values, without their respective Hcen coordinates to an Arr of type B. This method treats the HCenArrOpt class like a standard Arr or Array. It does not utilise the grid TGrid from which this TileArrOpt was created.

Maps the this Arr of Opt values, without their respective Hcen coordinates to an Arr of type B. This method treats the HCenArrOpt class like a standard Arr or Array. It does not utilise the grid TGrid from which this TileArrOpt was created.

Inherited from:
TileArrOpt
def mapSomes[B, ArrT <: SeqImut[B]](f: A => B)(implicit build: ArrBuilder[B, ArrT]): ArrT

Maps the Some values to type B by the parameter function. It ignores the None values. This method treats the HCenArr class like a standard Arr or Array. It does not utilise the grid TGrid from which this TileArrOpt was created.

Maps the Some values to type B by the parameter function. It ignores the None values. This method treats the HCenArr class like a standard Arr or Array. It does not utilise the grid TGrid from which this TileArrOpt was created.

Inherited from:
TileArrOpt
Inherited from:
TileArrOpt

Concrete fields