Struct ScyllaSparseHexGrid<TCell>.Enumerator
Value-type enumerator for ScyllaSparseHexGrid<TCell> enabling allocation-free
foreach iteration on the concrete type.
Yields (Coord, Value) tuples only for cells that have been explicitly set.
Iteration order follows the underlying dictionary (not deterministically ordered).
Inherited Members
Namespace: Scylla.Core.Structures
Assembly: ScyllaCore.dll
Syntax
public struct ScyllaSparseHexGrid<TCell>.Enumerator
Constructors
Enumerator(Enumerator)
Initializes a new enumerator wrapping the specified dictionary enumerator.
Declaration
public Enumerator(Dictionary<HexCoord, TCell>.Enumerator inner)
Parameters
| Type | Name | Description |
|---|---|---|
| Dictionary<HexCoord, TCell>.Enumerator | inner | The dictionary enumerator to wrap. |
Properties
Current
Gets the current (Coord, Value) pair. Only valid after a successful call to MoveNext().
Declaration
public readonly (HexCoord Coord, TCell Value) Current { get; }
Property Value
| Type | Description |
|---|---|
| (HexCoord Coord, TCell Value) |
Methods
MoveNext()
Advances the enumerator to the next cell.
Declaration
public bool MoveNext()
Returns
| Type | Description |
|---|---|
| bool | True if advanced; false if past the end. |