2023-11-04 02:04:16 +04:00
|
|
|
import java.awt.*;
|
|
|
|
import java.util.function.Supplier;
|
2023-11-04 02:32:04 +04:00
|
|
|
|
2023-11-04 02:04:16 +04:00
|
|
|
public class EntityBus {
|
|
|
|
private int speed;
|
|
|
|
public int getSpeed() {
|
|
|
|
return speed;
|
|
|
|
}
|
|
|
|
private double weight;
|
|
|
|
public double getWeight() {
|
|
|
|
return weight;
|
|
|
|
}
|
|
|
|
private Color bodyColor;
|
|
|
|
public Color getBodyColor() {
|
|
|
|
return bodyColor;
|
|
|
|
}
|
|
|
|
public Supplier<Double> step = () -> (double) speed * 100 / weight;
|
|
|
|
public EntityBus(int speed, double weight, Color bodyColor) {
|
|
|
|
this.speed = speed;
|
|
|
|
this.weight = weight;
|
|
|
|
this.bodyColor = bodyColor;
|
|
|
|
}
|
|
|
|
}
|