58 lines
1.5 KiB
Java
58 lines
1.5 KiB
Java
import java.awt.*;
|
|
public class EntityWarmlyShip {
|
|
private int Speed;
|
|
public int GetSpeed(){
|
|
return Speed;
|
|
}
|
|
private void SetSpeed(int speed){
|
|
Speed = speed;
|
|
}
|
|
private double Weight;
|
|
public double GetWeight(){
|
|
return Weight;
|
|
}
|
|
private void SetWeight(int weight){
|
|
Weight = weight;
|
|
}
|
|
private Color MainColor;
|
|
public Color GetMainColor(){
|
|
return MainColor;
|
|
}
|
|
private void SetMainColor(Color mainColor){
|
|
MainColor = mainColor;
|
|
}
|
|
private Color OptionalColor;
|
|
public Color GetOptionalColor(){
|
|
return OptionalColor;
|
|
}
|
|
private void SetOptionalColor(Color optionalColor){
|
|
OptionalColor = optionalColor;
|
|
}
|
|
private boolean Pipes;
|
|
public boolean GetPipes(){
|
|
return Pipes;
|
|
}
|
|
private void SetPipes(boolean pipes){
|
|
Pipes = pipes;
|
|
}
|
|
private boolean FuelCompartment;
|
|
public boolean GetFuelCompartment(){
|
|
return FuelCompartment;
|
|
}
|
|
private void SetFuelCompartment(boolean fuelCompartment){
|
|
FuelCompartment = fuelCompartment;
|
|
}
|
|
private double Step;
|
|
public double GetStep() {
|
|
return (double)Speed * 100 / Weight;
|
|
}
|
|
public void Init(int speed, double weight, Color mainColor, Color optionalColor, boolean pipes, boolean fuelCompartment)
|
|
{
|
|
Speed = speed;
|
|
Weight = weight;
|
|
MainColor = mainColor;
|
|
OptionalColor = optionalColor;
|
|
Pipes = pipes;
|
|
FuelCompartment = fuelCompartment;
|
|
}
|
|
} |