Style cleanup

This commit is contained in:
2025-03-02 17:19:57 +01:00
parent c0bc905c46
commit 284ab3079c
175 changed files with 588 additions and 650 deletions

View File

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