дубль2

This commit is contained in:
AnnaLioness 2023-09-15 14:12:57 +04:00
parent 8857f7ed10
commit 7846b78a34
2 changed files with 9 additions and 9 deletions

View File

@ -38,7 +38,7 @@ namespace Lab1ContainersShip
/// </summary>
private readonly int _shipHeight = 65;
/* public bool Init(int speed, double weight, Color bodyColor, Color
public bool Init(int speed, double weight, Color bodyColor, Color
additionalColor, bool crane, bool container, int width, int height)
{
// TODO: Продумать проверки
@ -53,8 +53,8 @@ additionalColor, bool crane, bool container, int width, int height)
crane, container);
return true;
}*/
public bool Init(EntityContainerShip entcon, int wid, int hei)
}
/*public bool Init(EntityContainerShip entcon, int wid, int hei)
{
_pictureWidth = wid;
_pictureHeight = hei;
@ -65,7 +65,7 @@ additionalColor, bool crane, bool container, int width, int height)
EntityContainerShip = entcon;
return true;
}
}*/
public void SetPosition(int x, int y)

View File

@ -48,15 +48,15 @@ namespace Lab1ContainersShip
Random random = new Random();
_drawningShip = new DrawingContainerShip();
EntityContainerShip _entitycont = new EntityContainerShip();
_entitycont.Init(random.Next(100, 300),
/*_entitycont.Init(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)));
/*_drawningShip.Init(random.Next(100, 300),
Convert.ToBoolean(random.Next(0, 2)));*/
_drawningShip.Init(random.Next(100, 300),
random.Next(1000, 3000),
Color.FromArgb(random.Next(0, 256), random.Next(0, 256),
random.Next(0, 256)),
@ -64,8 +64,8 @@ namespace Lab1ContainersShip
random.Next(0, 256)),
Convert.ToBoolean(random.Next(0, 2)),
Convert.ToBoolean(random.Next(0, 2)),
pictureBox1.Width, pictureBox1.Height);*/
_drawningShip.Init(_entitycont, pictureBox1.Width, pictureBox1.Height);
pictureBox1.Width, pictureBox1.Height);
//_drawningShip.Init(_entitycont, pictureBox1.Width, pictureBox1.Height);
_drawningShip.SetPosition(random.Next(10, 100),
random.Next(10, 100));
Draw();