Newer
Older
JumpingGame / src / Mass.java
public class Mass {
    private Acceleration acceleration;
    private double value;

    public Mass(Acceleration acceleration) {
        this.acceleration = acceleration;
    }

    public void setValue(double x) {
        this.value = x;
        acceleration.updateByMass(value);
    }

    public double getValue() {
        return value;
    }
}