diff --git a/SelfPropelledArtilleryUnit/DrawingObjectArtillery.cs b/SelfPropelledArtilleryUnit/DrawingObjectArtillery.cs index 7efa81c..b137411 100644 --- a/SelfPropelledArtilleryUnit/DrawingObjectArtillery.cs +++ b/SelfPropelledArtilleryUnit/DrawingObjectArtillery.cs @@ -36,5 +36,9 @@ namespace Artilleries { _artillery.DrawTransport(g); } + + public string GetInfo() => _artillery?.GetDateForSave(); + + public static IDrawingObject Create(string data) => new DrawingObjectArtillery(data.CreateDrawingArtillery()); } } diff --git a/SelfPropelledArtilleryUnit/IDrawingObject.cs b/SelfPropelledArtilleryUnit/IDrawingObject.cs index 4f7acc3..e2fddfe 100644 --- a/SelfPropelledArtilleryUnit/IDrawingObject.cs +++ b/SelfPropelledArtilleryUnit/IDrawingObject.cs @@ -13,5 +13,6 @@ namespace Artilleries void MoveObject(Direction direction); void DrawingObject(Graphics g); (float Left, float Right, float Top, float Bottom) GetCurrentPosition(); + string GetInfo(); } }