ready lab 8 for pul request
This commit is contained in:
parent
af1f332edc
commit
58521edbd2
@ -15,15 +15,19 @@ namespace ProjectElectricLocomotive
|
||||
|
||||
if (x == null || x.EntityLocomotive == null)
|
||||
throw new NotImplementedException(nameof(x));
|
||||
|
||||
if (y == null || y.EntityLocomotive == null)
|
||||
throw new NotImplementedException(nameof(y));
|
||||
|
||||
var bodyColor = x.EntityLocomotive.BodyColor.Name.CompareTo(y.EntityLocomotive.BodyColor.Name);
|
||||
|
||||
if (bodyColor != 0) return bodyColor;
|
||||
if(x.EntityLocomotive is EntityElectricLocomotive xEntityElectricLocomotive &&
|
||||
y.EntityLocomotive is EntityElectricLocomotive yEntityElectricLocomotive)
|
||||
|
||||
if(x.EntityLocomotive is EntityElectricLocomotive &&
|
||||
y.EntityLocomotive is EntityElectricLocomotive)
|
||||
{
|
||||
var addcolor = (x.EntityLocomotive as EntityElectricLocomotive).AdditionalColor.Name.CompareTo(
|
||||
(y.EntityLocomotive as EntityElectricLocomotive).AdditionalColor.Name);
|
||||
var addcolor = (x.EntityLocomotive as EntityElectricLocomotive).AdditionalColor.Name.CompareTo((y.EntityLocomotive
|
||||
as EntityElectricLocomotive).AdditionalColor.Name);
|
||||
if(addcolor != 0) return addcolor;
|
||||
}
|
||||
return 1;
|
||||
|
@ -9,9 +9,8 @@ using ProjectElectricLocomotive.MovementStrategy;
|
||||
|
||||
namespace ProjectElectricLocomotive.Generics
|
||||
{
|
||||
internal class LocomotiveGenericStorage
|
||||
internal class LocomotiveGenericStorage
|
||||
{
|
||||
|
||||
//create lab 7
|
||||
/// <summary>
|
||||
/// Словарь (хранилище)
|
||||
|
Loading…
Reference in New Issue
Block a user