Struct ScyllaSparseSquareGrid<TCell>.Enumerator
Value-type enumerator for ScyllaSparseSquareGrid<TCell> that enables
allocation-free foreach iteration when used on the concrete type.
Inherited Members
Namespace: Scylla.Core.Structures
Assembly: ScyllaCore.dll
Syntax
public struct ScyllaSparseSquareGrid<TCell>.Enumerator
Remarks
Each iteration step yields a (SquareCoord Coord, TCell Value) tuple for every
populated cell. Do not modify the grid while iterating.
Constructors
Enumerator(Enumerator)
Initializes a new ScyllaSparseSquareGrid<TCell>.Enumerator wrapping the given dictionary enumerator.
Declaration
public Enumerator(Dictionary<SquareCoord, TCell>.Enumerator inner)
Parameters
| Type | Name | Description |
|---|---|---|
| Dictionary<SquareCoord, TCell>.Enumerator | inner | The dictionary enumerator to wrap. |
Properties
Current
Gets the grid coordinate and its cell value at the current iteration position.
Declaration
public readonly (SquareCoord Coord, TCell Value) Current { get; }
Property Value
| Type | Description |
|---|---|
| (SquareCoord Coord, TCell Value) | A tuple |
Methods
MoveNext()
Advances the enumerator to the next populated cell.
Declaration
public bool MoveNext()
Returns
| Type | Description |
|---|---|
| bool |
|