diff --git a/Monorail/Monorail/MonorailCompareByColor.cs b/Monorail/Monorail/MonorailCompareByColor.cs index c07a070..a3ec3cb 100644 --- a/Monorail/Monorail/MonorailCompareByColor.cs +++ b/Monorail/Monorail/MonorailCompareByColor.cs @@ -18,9 +18,9 @@ namespace Monorail.Generics if (y == null || y.EntityMonorail == null) throw new ArgumentNullException(nameof(y)); - if (x.EntityMonorail.BodyColor.GetBrightness() != y.EntityMonorail.BodyColor.GetBrightness()) + if (x.EntityMonorail.BodyColor.Name != y.EntityMonorail.BodyColor.Name) { - return x.EntityMonorail.BodyColor.GetBrightness().CompareTo(y.EntityMonorail.BodyColor.GetBrightness()); + return x.EntityMonorail.BodyColor.Name.CompareTo(y.EntityMonorail.BodyColor.Name); } if (x.GetType().Name != y.GetType().Name) { @@ -33,9 +33,9 @@ namespace Monorail.Generics { EntityLocomotive EntityX = (EntityLocomotive)x.EntityMonorail; EntityLocomotive EntityY = (EntityLocomotive)y.EntityMonorail; - if(EntityX.AdditionalColor.GetBrightness() != EntityY.AdditionalColor.GetBrightness()) + if(EntityX.AdditionalColor.Name != EntityY.AdditionalColor.Name) { - return EntityX.AdditionalColor.GetBrightness().CompareTo(EntityY.AdditionalColor.GetBrightness()); + return EntityX.AdditionalColor.Name.CompareTo(EntityY.AdditionalColor.Name); } } var speedCompare = x.EntityMonorail.Speed.CompareTo(y.EntityMonorail.Speed);