From a0e946e6c2058a793392643a32f699bbb70813c3 Mon Sep 17 00:00:00 2001 From: 111 <0@yandex.ru> Date: Tue, 6 Dec 2022 15:36:03 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/DrawingObjectArmoredCar.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/DrawingObjectArmoredCar.java b/src/main/java/DrawingObjectArmoredCar.java index 5fc2d13..45d8440 100644 --- a/src/main/java/DrawingObjectArmoredCar.java +++ b/src/main/java/DrawingObjectArmoredCar.java @@ -1,5 +1,6 @@ import java.awt.*; import java.util.HashMap; +import java.util.Objects; public class DrawingObjectArmoredCar implements IDrawingObject{ private DrawingArmoredCar armoredCar = null; @@ -80,13 +81,13 @@ public class DrawingObjectArmoredCar implements IDrawingObject{ { return false; } - if (car.getBodyColor() != otherCarCar.getBodyColor()) + if (car.getBodyColor().getRGB() != otherCarCar.getBodyColor().getRGB()) { return false; } if (car instanceof EntityTank tank && otherCarCar instanceof EntityTank otherTank) { - if (tank.getDopColor() != otherTank.getDopColor()) + if (tank.getDopColor().getRGB() != otherTank.getDopColor().getRGB()) { return false; }