From c3bb9c66ccb6124ed8dbe21216e618aa67e437f7 Mon Sep 17 00:00:00 2001 From: malimova Date: Wed, 29 Nov 2023 21:08:42 +0400 Subject: [PATCH] =?UTF-8?q?=D0=92=D1=81=D1=91=20=D1=81=D0=B4=D0=B5=D0=BB?= =?UTF-8?q?=D0=B0=D0=BD=D0=BE,=20Lab2=20=D1=81=D0=B4=D0=B0=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AirBomber/AirBomber/FormAirBomber.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/AirBomber/AirBomber/FormAirBomber.cs b/AirBomber/AirBomber/FormAirBomber.cs index 17830fd..6922714 100644 --- a/AirBomber/AirBomber/FormAirBomber.cs +++ b/AirBomber/AirBomber/FormAirBomber.cs @@ -25,7 +25,7 @@ namespace AirBomber _drawningAirPlane = new DrawningAirBomber(random.Next(100, 300), random.Next(1000, 3000), Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)), Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)), Convert.ToBoolean(random.Next(0, 2)), Convert.ToBoolean(random.Next(0, 2)), - pictureBoxAirBomber.Width, pictureBoxAirBomber.Height, random.Next(1, 4) * 2, random.Next(1, 3)); + pictureBoxAirBomber.Width, pictureBoxAirBomber.Height, random.Next(1, 4) * 2, random.Next(0, 4)); _drawningAirPlane.SetPosition(random.Next(10, 100), random.Next(10, 100)); Draw(); @@ -36,7 +36,7 @@ namespace AirBomber Random random = new(); _drawningAirPlane = new DrawningAirPlane(random.Next(100, 300), random.Next(1000, 3000), Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256)), - pictureBoxAirBomber.Width, pictureBoxAirBomber.Height, random.Next(1, 4) * 2, random.Next(1, 3)); + pictureBoxAirBomber.Width, pictureBoxAirBomber.Height, random.Next(1, 4) * 2, random.Next(0, 4)); _drawningAirPlane.SetPosition(random.Next(10, 100), random.Next(10, 100)); Draw(); @@ -84,8 +84,7 @@ namespace AirBomber { return; } - _abstractStrategy.SetData(new - DrawningObjectAirPlane(_drawningAirPlane), pictureBoxAirBomber.Width, + _abstractStrategy.SetData(new DrawningObjectAirPlane(_drawningAirPlane), pictureBoxAirBomber.Width, pictureBoxAirBomber.Height); comboBoxStrategy.Enabled = false; }