From eff115d3da2aafed747a7ddda1ca321ce7b15178 Mon Sep 17 00:00:00 2001 From: kaznacheeva Date: Wed, 11 Oct 2023 10:25:33 +0400 Subject: [PATCH] =?UTF-8?q?=D0=B3=D0=BE=D1=82=D0=BE=D0=B2=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Battleship/Battleship/DrawningShip.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Battleship/Battleship/DrawningShip.cs b/Battleship/Battleship/DrawningShip.cs index 318a691..d6c291b 100644 --- a/Battleship/Battleship/DrawningShip.cs +++ b/Battleship/Battleship/DrawningShip.cs @@ -69,13 +69,14 @@ namespace Battleship.DrawningObjects /// Вес /// Основной цвет /// Ширина картинки - /// Высота картинки + /// Высота картинки /// Ширина прорисовки автомобиля /// Высота прорисовки автомобиля protected DrawningShip(int speed, double weight, Color bodyColor, int width, int height, int buttleshipWidth, int buttleshipHeight) { - // TODO: Продумать проверки + if (width <= _buttleshipWidth || height <= _buttleshipHeight) + return; _pictureWidth = width; _pictureHeight = height; _buttleshipWidth = buttleshipWidth;