Чистота
This commit is contained in:
parent
6028922e21
commit
d8ef359431
@ -3,11 +3,9 @@ import java.util.Random;
|
|||||||
|
|
||||||
public class DrawningAirFighter {
|
public class DrawningAirFighter {
|
||||||
private EntityAirFighter entityAirFighter;
|
private EntityAirFighter entityAirFighter;
|
||||||
|
|
||||||
public EntityAirFighter getEntityAirFighter() {
|
public EntityAirFighter getEntityAirFighter() {
|
||||||
return entityAirFighter;
|
return entityAirFighter;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Integer _pictureWidth;
|
private Integer _pictureWidth;
|
||||||
private Integer _pictureHeight;
|
private Integer _pictureHeight;
|
||||||
private Integer _startPosX;
|
private Integer _startPosX;
|
||||||
@ -83,8 +81,6 @@ public class DrawningAirFighter {
|
|||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -223,8 +219,6 @@ public class DrawningAirFighter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
drawningAirFighterEngine.drawAirFighterEngine(g, entityAirFighter.getAdditionalColor(), _startPosX, _startPosY);
|
drawningAirFighterEngine.drawAirFighterEngine(g, entityAirFighter.getAdditionalColor(), _startPosX, _startPosY);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@ import java.awt.*;
|
|||||||
|
|
||||||
public class DrawningAirFighterEngine {
|
public class DrawningAirFighterEngine {
|
||||||
private EngineCount engineCount;
|
private EngineCount engineCount;
|
||||||
|
|
||||||
public void setEnumNumber(int wheelCount) {
|
public void setEnumNumber(int wheelCount) {
|
||||||
for (EngineCount value : EngineCount.values()) {
|
for (EngineCount value : EngineCount.values()) {
|
||||||
if (value.getEnumNumber() == wheelCount) {
|
if (value.getEnumNumber() == wheelCount) {
|
||||||
@ -11,11 +10,11 @@ public class DrawningAirFighterEngine {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawAirFighterEngine(Graphics g, Color color, float startPosX, float startPosY) {
|
public void drawAirFighterEngine(Graphics g, Color color, float startPosX, float startPosY) {
|
||||||
Graphics2D g2d = (Graphics2D) g;
|
Graphics2D g2d = (Graphics2D) g;
|
||||||
g2d.setColor(color);
|
g2d.setColor(color);
|
||||||
g2d.setStroke(new BasicStroke(4));
|
g2d.setStroke(new BasicStroke(4));
|
||||||
|
|
||||||
if (engineCount.getEnumNumber() == 2){
|
if (engineCount.getEnumNumber() == 2){
|
||||||
g2d.drawRect((int)startPosX + 30, (int) startPosY + 69, 10, 2 );
|
g2d.drawRect((int)startPosX + 30, (int) startPosY + 69, 10, 2 );
|
||||||
g2d.drawRect((int)startPosX + 30, (int) startPosY + 3, 10, 2 );
|
g2d.drawRect((int)startPosX + 30, (int) startPosY + 3, 10, 2 );
|
||||||
|
@ -2,7 +2,6 @@ public enum EngineCount {
|
|||||||
Two(2),
|
Two(2),
|
||||||
Three(4),
|
Three(4),
|
||||||
Four(6);
|
Four(6);
|
||||||
|
|
||||||
final private int EnumNumber;
|
final private int EnumNumber;
|
||||||
EngineCount(int enumNumber) {
|
EngineCount(int enumNumber) {
|
||||||
EnumNumber = enumNumber;
|
EnumNumber = enumNumber;
|
||||||
|
@ -17,8 +17,6 @@ public class EntityAirFighter {
|
|||||||
public Color getAdditionalColor() {
|
public Color getAdditionalColor() {
|
||||||
return AdditionalColor;
|
return AdditionalColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public double Step() {
|
public double Step() {
|
||||||
return Speed*100/Weight;
|
return Speed*100/Weight;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user