Всё сделано, Lab2 сдана

This commit is contained in:
malimova 2023-11-29 21:08:42 +04:00
parent ec08a44682
commit c3bb9c66cc

View File

@ -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)), _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)), 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)), 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)); _drawningAirPlane.SetPosition(random.Next(10, 100), random.Next(10, 100));
Draw(); Draw();
@ -36,7 +36,7 @@ namespace AirBomber
Random random = new(); Random random = new();
_drawningAirPlane = new DrawningAirPlane(random.Next(100, 300), random.Next(1000, 3000), _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)), 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)); _drawningAirPlane.SetPosition(random.Next(10, 100), random.Next(10, 100));
Draw(); Draw();
@ -84,8 +84,7 @@ namespace AirBomber
{ {
return; return;
} }
_abstractStrategy.SetData(new _abstractStrategy.SetData(new DrawningObjectAirPlane(_drawningAirPlane), pictureBoxAirBomber.Width,
DrawningObjectAirPlane(_drawningAirPlane), pictureBoxAirBomber.Width,
pictureBoxAirBomber.Height); pictureBoxAirBomber.Height);
comboBoxStrategy.Enabled = false; comboBoxStrategy.Enabled = false;
} }