44 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WarmlyLocomotive.Entities;
/// <summary>
/// Базовый класс сущности
/// </summary>
public class EntityLocomotive
{
public int Speed { get; private set; }
public double Weight { get; private set; }
public Color BodyColor { get; private set; }
//public Color AdditionalColor { get; private set; }
//public bool Tube { get; private set; }
//public bool FuelTank { get; private set; }
public double Step => Speed * 100 / Weight;
/// <summary>
/// Конструктор, заменяющий init
/// </summary>
/// <param name="speed">скорость</param>
/// <param name="weight">вес</param>
/// <param name="bodyColor">цвет</param>
public EntityLocomotive(int speed, double weight, Color bodyColor)
{
Speed = speed;
Weight = weight;
BodyColor = bodyColor;
//AdditionalColor = additionalColor;
//Tube = tube;
//FuelTank = fuelTank;
}
}