Polevoy S.V Lab_work6 #7

Closed
ChipsEater wants to merge 9 commits from LabWork06 into LabWork05
2 changed files with 13 additions and 0 deletions
Showing only changes of commit 8d4407de4c - Show all commits

View File

@ -38,4 +38,16 @@ public class DrawingObjectArtillery implements IDrawingObject {
public void drawingObject(Graphics2D g) {
_artillery.drawTransport(g);
}
public String getInfo() {
if (_artillery == null) {
return null;
}
return ArtillerySerde.serialize(_artillery);
}
public static IDrawingObject create(String data) {
return new DrawingObjectArtillery(ArtillerySerde.deserialize(data));
}
}

View File

@ -6,4 +6,5 @@ public interface IDrawingObject {
void moveObject(Direction direction);
void drawingObject(Graphics2D g);
float[] getCurrentPosition();
String getInfo();
}