Add all missing docs
This commit is contained in:
@@ -16,6 +16,10 @@ public class BattleChoiceQueue : IDeepCloneable
|
||||
{
|
||||
private readonly ITurnChoice?[] _choices;
|
||||
private int _currentIndex;
|
||||
|
||||
/// <summary>
|
||||
/// Returns the last choice that was executed.
|
||||
/// </summary>
|
||||
public ITurnChoice? LastRanChoice { get; private set; }
|
||||
|
||||
/// <inheritdoc cref="BattleChoiceQueue"/>
|
||||
@@ -122,9 +126,15 @@ public class BattleChoiceQueue : IDeepCloneable
|
||||
|
||||
internal IReadOnlyList<ITurnChoice?> GetChoices() => _choices;
|
||||
|
||||
/// <summary>
|
||||
/// This returns the first choice that matches the predicate, or null if none was found.
|
||||
/// </summary>
|
||||
public ITurnChoice? FirstOrDefault(Func<ITurnChoice, bool> predicate) =>
|
||||
_choices.Skip(_currentIndex).WhereNotNull().FirstOrDefault(predicate);
|
||||
|
||||
/// <summary>
|
||||
/// Removes a choice from the queue.
|
||||
/// </summary>
|
||||
public void Remove(ITurnChoice choice)
|
||||
{
|
||||
var index = Array.FindIndex(_choices, _currentIndex, x => x == choice);
|
||||
|
||||
Reference in New Issue
Block a user