Interface: HexIterable<T>
Type parameters
Name | Type |
---|---|
T | extends Hex |
Hierarchy
Iterable
<T
>HexStore
<T
>↳
HexIterable
Implemented by
Table of contents
Properties
Methods
Properties
size
Readonly
size: number
Inherited from
Defined in
Methods
[iterator]
[iterator](): IterableIterator
<T
>
Returns
IterableIterator
<T
>
Overrides
Iterable.[iterator]
Defined in
filter
filter(predicate
): HexIterable
<T
>
Parameters
Name | Type |
---|---|
predicate | (hex : T ) => boolean |
Returns
HexIterable
<T
>
Defined in
forEach
forEach(fn
): HexIterable
<T
>
Parameters
Name | Type |
---|---|
fn | (hex : T ) => void |
Returns
HexIterable
<T
>
Defined in
getHex
getHex(coordinates
): undefined
| T
Parameters
Name | Type |
---|---|
coordinates | HexCoordinates |
Returns
undefined
| T
Inherited from
Defined in
hasHex
hasHex(hex
): boolean
Parameters
Name | Type |
---|---|
hex | T |
Returns
boolean
Inherited from
Defined in
map
map(fn
): HexIterable
<T
>
Parameters
Name | Type |
---|---|
fn | (hex : T ) => T |
Returns
HexIterable
<T
>
Defined in
reduce
reduce(reducer
): T
Parameters
Name | Type |
---|---|
reducer | (previousHex : T , currentHex : T ) => T |
Returns
T
Defined in
reduce(reducer
, initialValue
): T
Parameters
Name | Type |
---|---|
reducer | (previousHex : T , currentHex : T ) => T |
initialValue | T |
Returns
T
Defined in
reduce<R
>(reducer
, initialValue
): R
Type parameters
Name |
---|
R |
Parameters
Name | Type |
---|---|
reducer | (result : R , hex : T ) => R |
initialValue | R |
Returns
R
Defined in
setHexes
setHexes(hexesOrCoordinates
): HexIterable
<T
>
Parameters
Name | Type |
---|---|
hexesOrCoordinates | Iterable <HexCoordinates | T > |
Returns
HexIterable
<T
>
Inherited from
Defined in
toArray
toArray(): T
[]
Returns
T
[]