Newer
Older
JumpingGameOriginalSources / src / Force.java
k-fujii on 7 Dec 2021 349 bytes MapをPairクラスへ置換
import java.util.*;

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