Now you can get rollers' count

This commit is contained in:
Сергей Полевой 2022-11-20 22:03:58 +04:00
parent dc45239592
commit 63c379da6f
4 changed files with 13 additions and 0 deletions

View File

@ -19,6 +19,10 @@ public class DrawingCrossRollers implements IDrawingRollers {
}
}
public int getRollersCount() {
return rollersCount.getValue();
}
public void draw(Graphics2D g, int x, int y, int artilleryWidth, int artilleryHeight) {
g.setColor(color != null ? color : Color.BLACK);
g.fillOval(x + artilleryWidth / 20, y + artilleryHeight * 7 / 15, artilleryWidth * 4 / 20, artilleryHeight * 10 / 32);

View File

@ -19,6 +19,10 @@ public class DrawingRollers implements IDrawingRollers {
}
}
public int getRollersCount() {
return rollersCount.getValue();
}
public void draw(Graphics2D g, int x, int y, int artilleryWidth, int artilleryHeight) {
g.setColor(color != null ? color : Color.BLACK);
g.fillOval(x + artilleryWidth / 20, y + artilleryHeight * 7 / 15, artilleryWidth * 4 / 20, artilleryHeight * 10 / 32);

View File

@ -19,6 +19,10 @@ public class DrawingSquaredRollers implements IDrawingRollers {
}
}
public int getRollersCount() {
return rollersCount.getValue();
}
public void draw(Graphics2D g, int x, int y, int artilleryWidth, int artilleryHeight) {
g.setColor(color != null ? color : Color.BLACK);
g.fillOval(x + artilleryWidth / 20, y + artilleryHeight * 7 / 15, artilleryWidth * 4 / 20, artilleryHeight * 10 / 32);

View File

@ -4,4 +4,5 @@ public interface IDrawingRollers {
void setRollersCount(int num);
void setColor(Color color);
void draw(Graphics2D g, int x, int y, int artilleryWidth, int artilleryHeight);
int getRollersCount();
}