Add all missing docs

This commit is contained in:
Deukhoofd committed 2025-05-03 14:18:12 +02:00
1 parent 4d5dfd0342
commit 441f5dddaf
40 files changed
+400 -21

No files matched your search

@@ -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);