Compare commits
5 Commits
b24c1358e2
...
7479a44cf3
Author | SHA1 | Date | |
---|---|---|---|
7479a44cf3 | |||
26d83733e4 | |||
a925380371 | |||
98e674863f | |||
ec73e88d07 |
@ -1,5 +1,4 @@
|
||||
using Battleship.Drawings;
|
||||
using Battleship.Exceptions;
|
||||
using Battleship.Exceptions;
|
||||
|
||||
namespace Battleship.CollectionGenericObjects;
|
||||
|
||||
|
@ -44,6 +44,12 @@ public class StorageCollection<T>
|
||||
_storages = new Dictionary<CollectionInfo, ICollectionGenericObjects<T>>();
|
||||
}
|
||||
|
||||
private readonly string _collectionKey = "CollectionsStorage";
|
||||
|
||||
private readonly string _separatorForKeyValue = "|";
|
||||
|
||||
private readonly string _separatorItems = ";";
|
||||
|
||||
/// <summary>
|
||||
/// Добавление коллекции в хранилище
|
||||
/// </summary>
|
||||
|
@ -5,18 +5,6 @@
|
||||
/// </summary>
|
||||
public class EntityBattleship : EntityWarship
|
||||
{
|
||||
/// <summary>
|
||||
/// Скорость
|
||||
/// </summary>
|
||||
public int Speed { get; private set; }
|
||||
/// <summary>
|
||||
/// Вес
|
||||
/// </summary>
|
||||
public double Weight { get; private set; }
|
||||
/// <summary>
|
||||
/// Основной цвет
|
||||
/// </summary>
|
||||
public Color BodyColor { get; private set; }
|
||||
/// /// <summary>
|
||||
/// Признак (опция) отсека для ракет
|
||||
/// </summary>
|
||||
@ -57,6 +45,15 @@ public class EntityBattleship : EntityWarship
|
||||
AdditionalColor = additionalColor;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Получение строки с значением свойств объекта класса-сущности
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override string[] GetStringRepresentation()
|
||||
{
|
||||
return new[] { nameof(EntityBattleship), Speed.ToString(), Weight.ToString(), BodyColor.Name, Compartment.ToString(), Tower.ToString(), BodyDeck.ToString(), AdditionalColor.Name};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Создание продвинутого объекта из массива строк
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user