From 4a64cc1bb5adeee084254c7d292a77f8a193abb4 Mon Sep 17 00:00:00 2001 From: gg12 darfren Date: Tue, 12 Dec 2023 12:44:12 +0400 Subject: [PATCH] =?UTF-8?q?=D0=91=D0=B5=D0=B4=D0=B0=20=D0=BD=D0=B5=20?= =?UTF-8?q?=D0=BF=D1=80=D0=B8=D1=85=D0=BE=D0=B4=D0=B8=D1=82=20=D0=BE=D0=B4?= =?UTF-8?q?=D0=BD=D0=B0,=20=D0=BD=D0=BE=20=D0=B8=20=D1=83=D0=B4=D0=B0?= =?UTF-8?q?=D1=87=D0=B0=20=D1=82=D0=BE=D0=B6=D0=B5.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit — Ромен Роллан, французский писатель --- Monorail/Monorail/MonorailCompareByColor.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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);