Удалены лишние методы и изменен модификатор доступа у поля в классе FrameMonorail
This commit is contained in:
parent
aa1469a83d
commit
7d64623ac1
@ -10,10 +10,6 @@ public class DrawingMonorail {
|
||||
return entityMonorail;
|
||||
}
|
||||
|
||||
private void setEntityMonorail(EntityMonorail entityMonorail) {
|
||||
this.entityMonorail = entityMonorail;
|
||||
}
|
||||
|
||||
private DrawingWheels drawingWheels;
|
||||
|
||||
private int pictureWidth;
|
||||
|
@ -10,62 +10,36 @@ public class EntityMonorail {
|
||||
return speed;
|
||||
}
|
||||
|
||||
private void setSpeed(int speed) {
|
||||
this.speed = speed;
|
||||
}
|
||||
|
||||
private double weight;
|
||||
|
||||
public double getWeight() {
|
||||
return weight;
|
||||
}
|
||||
|
||||
private void setWeight(double weight) {
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
private Color mainColor;
|
||||
|
||||
public Color getMainColor() {
|
||||
return mainColor;
|
||||
}
|
||||
|
||||
private void setMainColor(Color mainColor) {
|
||||
this.mainColor = mainColor;
|
||||
}
|
||||
|
||||
private Color additionalColor;
|
||||
|
||||
public Color getAdditionalColor() {
|
||||
return additionalColor;
|
||||
}
|
||||
|
||||
private void setAdditionalColor(Color additionalColor) {
|
||||
this.additionalColor = additionalColor;
|
||||
}
|
||||
|
||||
private boolean magneticRail;
|
||||
|
||||
public boolean getMagneticRail() {
|
||||
return magneticRail;
|
||||
}
|
||||
|
||||
private void setMagneticRail(boolean magneticRail) {
|
||||
this.magneticRail = magneticRail;
|
||||
}
|
||||
|
||||
private boolean extraCabin;
|
||||
|
||||
public boolean getExtraCabin() {
|
||||
return extraCabin;
|
||||
}
|
||||
|
||||
private void setExtraCabin(boolean extraCabin) {
|
||||
this.extraCabin = extraCabin;
|
||||
}
|
||||
|
||||
private double step;
|
||||
|
||||
public double getStep() {
|
||||
return (double)speed * 100 / weight;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import javax.swing.*;
|
||||
|
||||
public class FrameMonorail extends JFrame {
|
||||
|
||||
PictureBox pictureBox;
|
||||
private PictureBox pictureBox;
|
||||
|
||||
public FrameMonorail() {
|
||||
super("Monorail");
|
||||
|
Loading…
Reference in New Issue
Block a user