В проверке на эквивалентность самолетов, добавлены проверки на тип и количество двигателей
This commit is contained in:
parent
9da6b57bd9
commit
5e1f609741
@ -50,7 +50,9 @@ namespace AirBomber
|
||||
|
||||
public bool Equals(IDrawningObject? other)
|
||||
{
|
||||
if (other is not DrawningObject otherAirplane)
|
||||
if (other is not DrawningObject otherAirplane ||
|
||||
_airplane.DrawningEngines?.GetType() != otherAirplane._airplane.DrawningEngines?.GetType() ||
|
||||
_airplane.DrawningEngines?.CountEngines != otherAirplane._airplane.DrawningEngines?.CountEngines)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user