Создание класса Direction

This commit is contained in:
malimova 2023-09-30 20:28:12 +04:00
parent cf72203a1c
commit 6e1fa7e9ec
2 changed files with 41 additions and 1 deletions

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AirBomber
{
internal class Direction
{
}
}

View File

@ -6,7 +6,35 @@ using System.Threading.Tasks;
namespace AirBomber namespace AirBomber
{ {
internal class EntityAirBomber public class EntityAirBomber
{ {
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 Bombs { get; private set; }
public bool FuelTanks { get; private set; }
public double Step => (double)Speed * 100 / Weight;
/// <summary>
/// Инициализация полей объекта-класса спортивного автомобиля
/// </summary>
/// <param name="speed">Скорость</param>
/// <param name="weight">Вес бомбардировщика</param>
/// <param name="bodyColor">Основной цвет</param>
/// <param name="additionalColor">Дополнительный цвет</param>
/// <param name="bombs">Признак наличия бомб</param>
/// <param name="fueltanks">Признак наличия топливных баков</param>
public void Init(int speed, double weight, Color bodyColor, Color
additionalColor, bool bombs, bool fueltanks)
{
Speed = speed;
Weight = weight;
BodyColor = bodyColor;
AdditionalColor = additionalColor;
Bombs = bombs;
FuelTanks = fueltanks;
}
} }
} }