LabWork08 Zacharchenko PIbd-21 #9

Closed
shadowik wants to merge 5 commits from LabWork08 into LabWork07
Showing only changes of commit 60be921810 - Show all commits

View File

@ -74,24 +74,26 @@ namespace DoubleDeckerBus
return false;
}
var bus = _bus.Bus;
var otherCarCar = otherBus._bus.Bus;
if (bus.Speed != otherCarCar.Speed)
var otherBusBus = otherBus._bus.Bus;
if (bus.GetType().Name != otherBusBus.GetType().Name)
{
return false;
}
if (bus.Weight != otherCarCar.Weight)
if (bus.Speed != otherBusBus.Speed)
{
return false;
}
if (bus.BodyColor != otherCarCar.BodyColor)
if (bus.Weight != otherBusBus.Weight)
{
return false;
}
if (bus.BodyColor != otherBusBus.BodyColor)
{
return false;
}
if (bus is EntityDDB DDB) {
if (other is not EntityDDB otherDDB) {
return false;
}
if (bus is EntityDDB DDB && otherBusBus is EntityDDB otherDDB)
{
if (DDB.Ledder != otherDDB.Ledder) {
return false;
@ -105,6 +107,7 @@ namespace DoubleDeckerBus
{
return false;
}
}
return true;