42 lines
1.1 KiB
Java
42 lines
1.1 KiB
Java
|
import java.awt.*;
|
||
|
class EntityLocomotive {
|
||
|
private int Speed, WheelNum;
|
||
|
private double Weight, Step;
|
||
|
private Color ColorBody, ColorWindow, ColorFillBody, ColorRoga;
|
||
|
public int Speed(){
|
||
|
return Speed;
|
||
|
}
|
||
|
public int WheelNum(){
|
||
|
return WheelNum;
|
||
|
}
|
||
|
public double Weight(){
|
||
|
return Weight;
|
||
|
}
|
||
|
public double Step(){
|
||
|
return Step;
|
||
|
}
|
||
|
public Color ColorBody(){
|
||
|
return ColorBody;
|
||
|
}
|
||
|
public Color ColorWindow(){
|
||
|
return ColorWindow;
|
||
|
}
|
||
|
public Color ColorFillBody(){
|
||
|
return ColorFillBody;
|
||
|
}
|
||
|
public Color ColorRoga() {
|
||
|
return ColorRoga;
|
||
|
}
|
||
|
public void Init(int speed, double weight, int wheelNum, Color colorBody, Color colorWindow, Color colorRoga, Color colorFillBody)
|
||
|
{
|
||
|
Speed = speed;
|
||
|
Weight = weight;
|
||
|
Step = (double)Speed * 100 / Weight;
|
||
|
WheelNum = wheelNum;
|
||
|
ColorBody = colorBody;
|
||
|
ColorWindow = colorWindow;
|
||
|
ColorFillBody = colorFillBody;
|
||
|
ColorRoga = colorRoga;
|
||
|
}
|
||
|
}
|