From 9c8cc5cd231f263e93411a26e4478b36d5afbc00 Mon Sep 17 00:00:00 2001 From: "ns.potapov" Date: Mon, 25 Sep 2023 22:47:40 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D1=80=D0=BE=D0=B4=D0=B8=D1=82=D0=B5=D0=BB=D1=8C=D1=81?= =?UTF-8?q?=D0=BA=D0=B8=D0=B9=20=D0=BA=D0=BB=D0=B0=D1=81=D1=81=20=D1=81?= =?UTF-8?q?=D1=83=D1=89=D0=BD=D0=BE=D1=81=D1=82=D1=8C=20=D0=B4=D0=BB=D1=8F?= =?UTF-8?q?=20=D0=BF=D1=80=D0=BE=D1=81=D1=82=D0=BE=D0=B3=D0=BE=20=D0=BE?= =?UTF-8?q?=D0=B1=D1=8A=D0=B5=D0=BA=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectStormtrooper/EntityPlane.cs | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 ProjectStormtrooper/ProjectStormtrooper/EntityPlane.cs diff --git a/ProjectStormtrooper/ProjectStormtrooper/EntityPlane.cs b/ProjectStormtrooper/ProjectStormtrooper/EntityPlane.cs new file mode 100644 index 0000000..3411574 --- /dev/null +++ b/ProjectStormtrooper/ProjectStormtrooper/EntityPlane.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Sockets; +using System.Text; +using System.Threading.Tasks; +using static System.Reflection.Metadata.BlobBuilder; + +namespace ProjectStormtrooper +{ + /// + /// Класс-сущность "Самолет" + /// + public class EntityPlane + { + /// + /// Скорость + /// + public int Speed { get; private set; } + /// + /// Вес + /// + public double Weight { get; private set; } + /// + /// Основной цвет + /// + public Color BodyColor { get; private set; } + /// + /// Шаг перемещения + /// + public double Step => (double)Speed * 250 / Weight; + public EntityPlane(int speed, double weight, Color bodyColor) + { + Speed = speed; + Weight = weight; + BodyColor = bodyColor; + } + } +}