From 117d18566a61375809b358314e5b60399ba30bb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B0=D0=BA=D1=81=20=D0=91=D0=BE=D0=BD=D0=B4=D0=B0?= =?UTF-8?q?=D1=80=D0=B5=D0=BD=D0=BA=D0=BE?= Date: Fri, 11 Nov 2022 16:06:26 +0400 Subject: [PATCH] =?UTF-8?q?=D0=93=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 --- WarmlyShip/WarmlyShip/DrawningMotorShip.cs | 3 +-- WarmlyShip/WarmlyShip/EntityWarmlyShip.cs | 4 ++-- WarmlyShip/WarmlyShip/FormShipConfig.cs | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/WarmlyShip/WarmlyShip/DrawningMotorShip.cs b/WarmlyShip/WarmlyShip/DrawningMotorShip.cs index a422328..4e8821f 100644 --- a/WarmlyShip/WarmlyShip/DrawningMotorShip.cs +++ b/WarmlyShip/WarmlyShip/DrawningMotorShip.cs @@ -43,8 +43,7 @@ namespace WarmlyShip public DrawningMotorShip ModifShip(int? speed = null, float? weight = null, Color? bodyColor = null, Color? dopColor = null, bool? tubes = null, bool? cistern = null) { - EntityMotorShip motorShip = (EntityMotorShip)warmlyShip; - return new DrawningMotorShip(speed ?? warmlyShip.Speed, weight ?? warmlyShip.Weight, bodyColor ?? warmlyShip.BodyColor, dopColor ?? motorShip.DopColor, tubes ?? motorShip.Tubes, cistern ?? motorShip.Cistern); + return new DrawningMotorShip(speed ?? warmlyShip.Speed, weight ?? warmlyShip.Weight, bodyColor ?? warmlyShip.BodyColor, dopColor ?? ((EntityMotorShip)warmlyShip).DopColor, tubes ?? ((EntityMotorShip)warmlyShip).Tubes, cistern ?? ((EntityMotorShip)warmlyShip).Cistern); } } } \ No newline at end of file diff --git a/WarmlyShip/WarmlyShip/EntityWarmlyShip.cs b/WarmlyShip/WarmlyShip/EntityWarmlyShip.cs index e36f167..79878fb 100644 --- a/WarmlyShip/WarmlyShip/EntityWarmlyShip.cs +++ b/WarmlyShip/WarmlyShip/EntityWarmlyShip.cs @@ -17,8 +17,8 @@ namespace WarmlyShip public EntityWarmlyShip(int speed, float weight, Color bodyColor) { Random random = new Random(); - Speed = speed <= 0 ? random.Next(50, 150) : speed; - Weight = weight <= 0 ? random.Next(40, 70) : weight; + Speed = speed <= 0 ? random.Next(100, 300) : speed; + Weight = weight <= 0 ? random.Next(1000, 2000) : weight; BodyColor = bodyColor; } } diff --git a/WarmlyShip/WarmlyShip/FormShipConfig.cs b/WarmlyShip/WarmlyShip/FormShipConfig.cs index 7802092..8e7fa69 100644 --- a/WarmlyShip/WarmlyShip/FormShipConfig.cs +++ b/WarmlyShip/WarmlyShip/FormShipConfig.cs @@ -23,7 +23,7 @@ namespace WarmlyShip panelBlack.MouseDown += PanelColor_MouseDown; panelPink.MouseDown += PanelColor_MouseDown; panelGreen.MouseDown += PanelColor_MouseDown; - panelGreen.MouseDown += PanelColor_MouseDown; + panelCyan.MouseDown += PanelColor_MouseDown; panelRed.MouseDown += PanelColor_MouseDown; panelWhite.MouseDown += PanelColor_MouseDown; panelYellow.MouseDown += PanelColor_MouseDown;