From fbd46924d1ba0f4ca3f126755d695c2898d21525 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: Sat, 8 Oct 2022 19:19:17 +0400 Subject: [PATCH] Added interface IDrawingRollers --- DrawingArtillery.java | 2 +- DrawingRollers.java | 2 +- IDrawingRollers.java | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 IDrawingRollers.java 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); +}