type sort fix and small name fix
This commit is contained in:
parent
a617fa1730
commit
a09e502cd7
@ -42,11 +42,11 @@ namespace Airbus
|
||||
{
|
||||
return xAirplaneColor.CompareTo(yAirplaneColor);
|
||||
}
|
||||
if (xAirplane.GetAirplane.airplane is EntityAirbus xContainerShip && yAirplane.GetAirplane.airplane is EntityAirbus yContainerShip)
|
||||
if (xAirplane.GetAirplane.airplane is EntityAirbus xAirbus && yAirplane.GetAirplane.airplane is EntityAirbus yAirbus)
|
||||
{
|
||||
string xShipDopColor = xContainerShip.DopColor.Name;
|
||||
string yShipDopColor = yContainerShip.DopColor.Name;
|
||||
var dopColorCompare = xShipDopColor.CompareTo(yShipDopColor);
|
||||
string xAirplaneDopColor = xAirbus.DopColor.Name;
|
||||
string yAirplaneDopColor = yAirbus.DopColor.Name;
|
||||
var dopColorCompare = xAirplaneDopColor.CompareTo(yAirplaneDopColor);
|
||||
if (dopColorCompare != 0)
|
||||
{
|
||||
return dopColorCompare;
|
||||
|
@ -49,6 +49,10 @@ namespace Airbus
|
||||
}
|
||||
var airplane = _airplane.airplane;
|
||||
var otherAirplaneAirplane = otherAirplane._airplane.airplane;
|
||||
if (airplane.GetType() != otherAirplaneAirplane.GetType())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (airplane.Speed != otherAirplaneAirplane.Speed)
|
||||
{
|
||||
return false;
|
||||
|
@ -72,11 +72,11 @@ namespace Airbus
|
||||
}
|
||||
public IEnumerable<T> GetAirplanes()
|
||||
{
|
||||
foreach (var car in _places)
|
||||
foreach (var airplane in _places)
|
||||
{
|
||||
if (car != null)
|
||||
if (airplane != null)
|
||||
{
|
||||
yield return car;
|
||||
yield return airplane;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user