Newer
Older
JumpingGameOriginalSources / src / Force.java
k-fujii on 2 Dec 2021 394 bytes initial commit
import java.util.*;

public class Force {
	private Acceleration acceleration;
	private Map.Entry<Double, Double> force;
	public Force(Acceleration acceleration) {
		this.acceleration = acceleration;
	}
	public void gravity(double y) {
		this.force = new AbstractMap.SimpleEntry<>(0.0, y);
		acceleration.updateForce(force);
	}
	public Map.Entry<Double, Double> getForce() {
		return force;
	}
}