diff --git a/DrawingArtillery.java b/DrawingArtillery.java index 2b64328..2ea1b66 100644 --- a/DrawingArtillery.java +++ b/DrawingArtillery.java @@ -2,7 +2,7 @@ import java.awt.*; public class DrawingArtillery { protected EntityArtillery artillery; - protected DrawingRollers drawingRollers; + protected IDrawingRollers drawingRollers; protected float _startPosX; protected float _startPosY; private Integer _pictureWidth = null; diff --git a/DrawingRollers.java b/DrawingRollers.java index d12eafd..0c68703 100644 --- a/DrawingRollers.java +++ b/DrawingRollers.java @@ -1,6 +1,6 @@ import java.awt.*; -public class DrawingRollers { +public class DrawingRollers implements IDrawingRollers { private RollersCount rollersCount; private Color color; diff --git a/IDrawingRollers.java b/IDrawingRollers.java new file mode 100644 index 0000000..a8fbe42 --- /dev/null +++ b/IDrawingRollers.java @@ -0,0 +1,6 @@ +import java.awt.*; + +public interface IDrawingRollers { + void setRollersCount(int num); + void draw(Graphics2D g, int x, int y, int artilleryWidth, int artilleryHeight); +}