More moves implemented
This commit is contained in:
@@ -16,6 +16,7 @@ public class BattleChoiceQueue : IDeepCloneable
|
||||
{
|
||||
private readonly ITurnChoice?[] _choices;
|
||||
private int _currentIndex;
|
||||
public ITurnChoice? LastRanChoice { get; private set; }
|
||||
|
||||
/// <inheritdoc cref="BattleChoiceQueue"/>
|
||||
public BattleChoiceQueue(ITurnChoice[] choices)
|
||||
@@ -36,6 +37,7 @@ public class BattleChoiceQueue : IDeepCloneable
|
||||
var choice = _choices[_currentIndex];
|
||||
_choices[_currentIndex] = null;
|
||||
_currentIndex++;
|
||||
LastRanChoice = choice;
|
||||
return choice;
|
||||
}
|
||||
|
||||
@@ -99,4 +101,6 @@ public class BattleChoiceQueue : IDeepCloneable
|
||||
}
|
||||
|
||||
internal IReadOnlyList<ITurnChoice?> GetChoices() => _choices;
|
||||
|
||||
public ITurnChoice? Where(Func<ITurnChoice, bool> predicate) => _choices.WhereNotNull().FirstOrDefault(predicate);
|
||||
}
|
||||
Reference in New Issue
Block a user