PIbd-22_Isaeva_A.I._Airbus_.../Airbus/EntityAirbus.cs

43 lines
1.2 KiB
C#
Raw Normal View History

2023-10-08 19:18:23 +04:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AirBus
{
public class EntityAirBus
{
// Скорость
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 IsCompartment { get; private set; }
// наличие доп двигателей
public bool IsAdditionalEngine { get; private set; }
// шаг перемещения
public double Step => (double)Speed * 100 / Weight;
public void Init (int speed, double weight, Color bodyColor, Color additionalColor, bool isCompartment, bool isAdditionalEngine)
{
Speed = speed;
Weight = weight;
BodyColor = bodyColor;
AdditionalColor = additionalColor;
IsCompartment = isCompartment;
IsAdditionalEngine = isAdditionalEngine;
}
}
}