From baff437cf5c60b688960807e98525e1b2d134d80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=9F=D0=BE=D0=BB?= =?UTF-8?q?=D0=B5=D0=B2=D0=BE=D0=B9?= Date: Fri, 4 Nov 2022 16:48:55 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D1=91=D0=BD?= =?UTF-8?q?=D1=8B=20=D0=B8=D0=BD=D1=82=D0=B5=D1=80=D1=84=D0=B5=D0=B9=D1=81?= =?UTF-8?q?=20IDrawingObject=20=D0=B8=20=D0=BA=D0=BB=D0=B0=D1=81=D1=81=20D?= =?UTF-8?q?rawingObjectArtillery?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SelfPropelledArtilleryUnit/DrawingObjectArtillery.cs | 4 ++++ SelfPropelledArtilleryUnit/IDrawingObject.cs | 1 + 2 files changed, 5 insertions(+) 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(); } }