using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Warship { public class EntityWarship { public int Speed { get; private set; } public float Weight { get; private set; } public Color BodyColor { get; private set; } public int Step => (int)(Speed * 2000 / Weight); public EntityWarship(int speed, float weight, Color bodyColor) { Random rnd = new(); Speed = speed <= 0 ? rnd.Next(10, 60) : speed; Weight = weight <= 0 ? rnd.Next(20000, 23000) : weight; BodyColor = bodyColor; } } }