Style cleanup
This commit is contained in:
@@ -7,7 +7,6 @@ namespace PkmnLib.Dynamic.Models.Choices;
|
||||
/// </summary>
|
||||
public interface IFleeChoice : ITurnChoice
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IFleeChoice"/>
|
||||
@@ -22,7 +21,9 @@ public class FleeTurnChoice : TurnChoice, IFleeChoice
|
||||
public override int ScriptCount => User.ScriptCount;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void GetOwnScripts(List<IEnumerable<ScriptContainer>> scripts) { }
|
||||
public override void GetOwnScripts(List<IEnumerable<ScriptContainer>> scripts)
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void CollectScripts(List<IEnumerable<ScriptContainer>> scripts) => User.CollectScripts(scripts);
|
||||
|
||||
@@ -12,7 +12,7 @@ public interface IItemChoice : ITurnChoice
|
||||
/// The item that is used.
|
||||
/// </summary>
|
||||
public IItem Item { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The side the move is targeted at.
|
||||
/// </summary>
|
||||
|
||||
@@ -32,9 +32,9 @@ public interface IMoveChoice : ITurnChoice
|
||||
/// The underlying script of the move.
|
||||
/// </summary>
|
||||
ScriptContainer Script { get; set; }
|
||||
|
||||
|
||||
Dictionary<StringKey, object?>? AdditionalData { get; }
|
||||
|
||||
|
||||
IScriptSet Volatile { get; }
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public class MoveChoice : TurnChoice, IMoveChoice
|
||||
ChosenMove = usedMove;
|
||||
TargetSide = targetSide;
|
||||
TargetPosition = targetPosition;
|
||||
|
||||
|
||||
var secondaryEffect = usedMove.MoveData.SecondaryEffect;
|
||||
if (secondaryEffect != null)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,6 @@ namespace PkmnLib.Dynamic.Models.Choices;
|
||||
/// </summary>
|
||||
public interface IPassChoice : ITurnChoice
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class PassChoice : TurnChoice, IPassChoice
|
||||
|
||||
@@ -7,7 +7,7 @@ public class TurnChoiceComparer : IComparer<ITurnChoice>
|
||||
{
|
||||
/// <inheritdoc cref="TurnChoiceComparer"/>
|
||||
public static TurnChoiceComparer Instance { get; } = new();
|
||||
|
||||
|
||||
private enum CompareValues
|
||||
{
|
||||
XEqualsY = 0,
|
||||
@@ -25,7 +25,7 @@ public class TurnChoiceComparer : IComparer<ITurnChoice>
|
||||
// This is to ensure that the order of choices is deterministic.
|
||||
return (CompareValues)x.RandomValue.CompareTo(y.RandomValue);
|
||||
}
|
||||
|
||||
|
||||
private static CompareValues CompareImpl(ITurnChoice? x, ITurnChoice? y)
|
||||
{
|
||||
// Deal with possible null values
|
||||
@@ -77,10 +77,10 @@ public class TurnChoiceComparer : IComparer<ITurnChoice>
|
||||
_ => CompareValues.XGreaterThanY,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
return CompareValues.XLessThanY;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public int Compare(ITurnChoice? x, ITurnChoice? y) => (int) CompareImpl(x, y);
|
||||
public int Compare(ITurnChoice? x, ITurnChoice? y) => (int)CompareImpl(x, y);
|
||||
}
|
||||
Reference in New Issue
Block a user