An array of hex tile or hex centre data. For efficiency the data is stored as a flat Array. No run time information distinguishes this from an ordinary linear sequence array of data. Whether in a game or a non game application the data of the grid tiles is likely to change much more frequently than the size, shape, structure of the grid. The compiler knows this is hex grid array and hence the data should be set and retrieved through the HGrid hex grid. So nearly all the methods take the HGrid as an implicit parameter.
- Companion:
- object
Value members
Concrete methods
Completes the given row from the given starting c column value to the end of the row. An exception is thrown if the tile values don't match with the end of the row.
Completes the given row from the given starting c column value to the end of the row. An exception is thrown if the tile values don't match with the end of the row.
HCen with map. Applies the function to each HCen coordinate with the corresponding element in the underlying array. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.
HCen with map. Applies the function to each HCen coordinate with the corresponding element in the underlying array. Note the function signature follows the foreach based convention of putting the collection element 2nd or last as seen for example in fold methods' (accumulator, element) => B signature.
Sets the given row from the given starting c column value, for the given number of tile centre values. An exception is thrown if the numOfCens overflows the row end.
Sets the given row from the given starting c column value, for the given number of tile centre values. An exception is thrown if the numOfCens overflows the row end.
Inherited methods
For each element in the underlying array performs the side effecting function. This method treats the TileCenArr class like a standard Arr or Array. It does not utilise the grid TGrid from which this TileCenArr was created.
For each element in the underlying array performs the side effecting function. This method treats the TileCenArr class like a standard Arr or Array. It does not utilise the grid TGrid from which this TileCenArr was created.
- Inherited from:
- TileCenArr
The number of tile centres this array of data represents.
The number of tile centres this array of data represents.
- Inherited from:
- TileCenArr
Each element in the underlying array is mapped by the parameter function to an element of type B. This method treat the HCenArr class like a standard Arr or Array. It does not utilise the grid HGrid from which this HCenArr was created.
Each element in the underlying array is mapped by the parameter function to an element of type B. This method treat the HCenArr class like a standard Arr or Array. It does not utilise the grid HGrid from which this HCenArr was created.
- Inherited from:
- TileCenArr