diff --git a/Battleship/Battleship/CollectionGenericObjects/ListGenericObjects.cs b/Battleship/Battleship/CollectionGenericObjects/ListGenericObjects.cs index a429a02..71e5678 100644 --- a/Battleship/Battleship/CollectionGenericObjects/ListGenericObjects.cs +++ b/Battleship/Battleship/CollectionGenericObjects/ListGenericObjects.cs @@ -1,5 +1,4 @@ -using Battleship.Drawings; -using Battleship.Exceptions; +using Battleship.Exceptions; namespace Battleship.CollectionGenericObjects; diff --git a/Battleship/Battleship/CollectionGenericObjects/StorageCollection.cs b/Battleship/Battleship/CollectionGenericObjects/StorageCollection.cs index 620dabc..f3e3e56 100644 --- a/Battleship/Battleship/CollectionGenericObjects/StorageCollection.cs +++ b/Battleship/Battleship/CollectionGenericObjects/StorageCollection.cs @@ -44,6 +44,12 @@ public class StorageCollection _storages = new Dictionary>(); } + private readonly string _collectionKey = "CollectionsStorage"; + + private readonly string _separatorForKeyValue = "|"; + + private readonly string _separatorItems = ";"; + /// /// Добавление коллекции в хранилище /// 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}; + } + /// /// Создание продвинутого объекта из массива строк /// diff --git a/log.txt b/log.txt new file mode 100644 index 0000000..e69de29