From 98e674863ff81235bb1d5b470a58252cffea3122 Mon Sep 17 00:00:00 2001 From: victinass Date: Mon, 29 Apr 2024 14:27:19 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9B=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=BD=D0=B0=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82?= =?UTF-8?q?=D0=B0=20=E2=84=966?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Battleship/Entities/EntityBattleship.cs | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/Battleship/Battleship/Entities/EntityBattleship.cs b/Battleship/Battleship/Entities/EntityBattleship.cs index 3ae9a41..353a60a 100644 --- a/Battleship/Battleship/Entities/EntityBattleship.cs +++ b/Battleship/Battleship/Entities/EntityBattleship.cs @@ -5,18 +5,6 @@ /// public class EntityBattleship : EntityWarship { - /// - /// Скорость - /// - public int Speed { get; private set; } - /// - /// Вес - /// - public double Weight { get; private set; } - /// - /// Основной цвет - /// - public Color BodyColor { get; private set; } /// /// /// Признак (опция) отсека для ракет /// @@ -57,6 +45,15 @@ public class EntityBattleship : EntityWarship AdditionalColor = additionalColor; } + /// + /// Получение строки с значением свойств объекта класса-сущности + /// + /// + public override string[] GetStringRepresentation() + { + return new[] { nameof(EntityBattleship), Speed.ToString(), Weight.ToString(), BodyColor.Name, Compartment.ToString(), Tower.ToString(), BodyDeck.ToString(), AdditionalColor.Name}; + } + /// /// Создание продвинутого объекта из массива строк ///