From 6e1fa7e9ec9a6fd4d5116f7a061b3e29afb0b243 Mon Sep 17 00:00:00 2001 From: malimova Date: Sat, 30 Sep 2023 20:28:12 +0400 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BA=D0=BB=D0=B0=D1=81=D1=81=D0=B0=20Direction?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AirBomber/AirBomber/Direction.cs | 12 +++++++++++ AirBomber/AirBomber/EntityAirBomber.cs | 30 +++++++++++++++++++++++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 AirBomber/AirBomber/Direction.cs diff --git a/AirBomber/AirBomber/Direction.cs b/AirBomber/AirBomber/Direction.cs new file mode 100644 index 0000000..eb271bc --- /dev/null +++ b/AirBomber/AirBomber/Direction.cs @@ -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 + { + } +} diff --git a/AirBomber/AirBomber/EntityAirBomber.cs b/AirBomber/AirBomber/EntityAirBomber.cs index d1af57d..fa37724 100644 --- a/AirBomber/AirBomber/EntityAirBomber.cs +++ b/AirBomber/AirBomber/EntityAirBomber.cs @@ -6,7 +6,35 @@ using System.Threading.Tasks; 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; + /// + /// Инициализация полей объекта-класса спортивного автомобиля + /// + /// Скорость + /// Вес бомбардировщика + /// Основной цвет + /// Дополнительный цвет + /// Признак наличия бомб + /// Признак наличия топливных баков + 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; + } + } }