diff --git a/ArmoredCar/ArmoredCar/FormCar.cs b/ArmoredCar/ArmoredCar/FormCar.cs index 9f5049c..e48d650 100644 --- a/ArmoredCar/ArmoredCar/FormCar.cs +++ b/ArmoredCar/ArmoredCar/FormCar.cs @@ -36,8 +36,7 @@ namespace ArmoredCar private void ButtonCreate_Click(object sender, EventArgs e) { Random rnd = new(); - _car = new DrawningArmoredCar(); - _car.Init(rnd.Next(100, 300), rnd.Next(1000, 2000), + _car = new DrawningArmoredCar(rnd.Next(100, 300), rnd.Next(1000, 2000), Color.FromArgb(rnd.Next(0, 256), rnd.Next(0, 256), rnd.Next(0, 256))); _car.SetPosition(rnd.Next(10, 100), rnd.Next(10, 100), pictureBoxCar.Width, pictureBoxCar.Height);