Style cleanup
This commit is contained in:
@@ -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