Struct TurnList
- Namespace
- MarymoorStudios.Core.Promises
- Assembly
- MarymoorStudios.Core.Promises.dll
A circular, singularly-linked list of turns.
public struct TurnList : IEnumerable<Turn>, IEnumerable
- Implements
- Inherited Members
Properties
Count
The number of items in this (possibly empty) list.
public readonly int Count { get; }
Property Value
IsEmpty
True if the list is empty, false otherwise.
public readonly bool IsEmpty { get; }
Property Value
Methods
Append(ref TurnList)
Appends a complete (possibly empty) list to another (possibly empty) list.
public void Append(ref TurnList source)
Parameters
source
TurnListThe (possibly empty) list of turns to append to the end of this list.
AppendOne(Turn)
Appends an unattached (not part of a list) turn to this list.
public void AppendOne(Turn source)
Parameters
source
TurnThe unattached turn to append to the end of this list.
GetEnumerator()
Returns a pattern-based (non-allocating) enumerator.
public readonly Turn.TurnEnumerator GetEnumerator()
Returns
TryRemoveHead(out Turn)
Attempts to remove one item from the head of this list.
public bool TryRemoveHead(out Turn item)
Parameters
item
TurnIf successful, the item that was removed from the head of this list,
null
otherwise.
Returns
- bool
True if an item was successfully removed, false otherwise.