Убрал одинаковый код

This commit is contained in:
artur-kalimullin 2024-04-23 23:15:34 +04:00
commit 471fd18960
3 changed files with 3 additions and 4 deletions

View File

@ -1,6 +1,5 @@
import java.awt.*;
import java.util.Random;
public class DrawningAirFighter {
private EntityAirFighter entityAirFighter;
public EntityAirFighter getEntityAirFighter() {

View File

@ -15,17 +15,17 @@ public class DrawningAirFighterEngine {
g2d.setColor(color);
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 + 3, 10, 2 );
}
if (_engineCount.getEnumNumber() <= 4){
if (_engineCount.getEnumNumber() >= 4){
g2d.drawRect((int)startPosX + 30, (int) startPosY + 62, 10, 2 );
g2d.drawRect((int)startPosX + 30, (int) startPosY + 10, 10, 2 );
}
if (_engineCount.getEnumNumber() <= 6){
if (_engineCount.getEnumNumber() >= 6){
g2d.drawRect((int)startPosX + 30, (int) startPosY + 55, 10, 2 );
g2d.drawRect((int)startPosX + 30, (int) startPosY + 17, 10, 2 );
}