From 5e1f6097414c4828a60d5062ac3bcdca9b6ae1e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B0=D0=BD=D0=B8=D1=8F=D1=80=20=D0=90=D0=B3=D0=BB?= =?UTF-8?q?=D0=B8=D1=83=D0=BB=D0=BB=D0=BE=D0=B2?= Date: Tue, 1 Nov 2022 21:30:26 +0400 Subject: [PATCH] =?UTF-8?q?=D0=92=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D0=BA=D0=B5=20=D0=BD=D0=B0=20=D1=8D=D0=BA=D0=B2=D0=B8=D0=B2?= =?UTF-8?q?=D0=B0=D0=BB=D0=B5=D0=BD=D1=82=D0=BD=D0=BE=D1=81=D1=82=D1=8C=20?= =?UTF-8?q?=D1=81=D0=B0=D0=BC=D0=BE=D0=BB=D0=B5=D1=82=D0=BE=D0=B2,=20?= =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=BF?= =?UTF-8?q?=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B8=20=D0=BD=D0=B0=20?= =?UTF-8?q?=D1=82=D0=B8=D0=BF=20=D0=B8=20=D0=BA=D0=BE=D0=BB=D0=B8=D1=87?= =?UTF-8?q?=D0=B5=D1=81=D1=82=D0=B2=D0=BE=20=D0=B4=D0=B2=D0=B8=D0=B3=D0=B0?= =?UTF-8?q?=D1=82=D0=B5=D0=BB=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AirBomber/AirBomber/DrawningObject.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AirBomber/AirBomber/DrawningObject.cs b/AirBomber/AirBomber/DrawningObject.cs index ba53095..251f49a 100644 --- a/AirBomber/AirBomber/DrawningObject.cs +++ b/AirBomber/AirBomber/DrawningObject.cs @@ -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; }