using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ProjectMonorail.Entities; /// /// Класс-сущность "Поезд" /// public class EntityTrain { /// /// Скорость /// public int Speed { get; private set; } /// /// Вес /// public double Weight { get; private set; } /// /// Основной цвет /// public Color MainColor { get; private set; } /// /// Шаг передвижения /// public double Step => Speed * 100 / Weight; /// /// Конструктор сущности /// /// Скорость /// Вес /// Основной цвет public EntityTrain(int speed, double weight, Color mainColor) { Speed = speed; Weight = weight; MainColor = mainColor; } }