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

public class JumpGame {
	private Time time = new Time();
	private Ground ground = new Ground();
	private Position position = new Position(ground);
	private Gameover gameover = new Gameover(position);
	private Onground onground = new Onground(ground,position);
	private Velocity velocity = new Velocity(position,onground);
	private Clear clear = new Clear(position);
	private Move move = new Move(velocity);
	private Acceleration acceleration = new Acceleration(velocity,onground);
	private Mass mass = new Mass(acceleration);
	private Force force = new Force(acceleration);
	public void gravity(double y) {
		this.force.gravity(y);
		this.time.gravity(y);
	}
	public void moveX(double x) {
		this.move.moveX(x);
	}
	public void moveY(double y) {
		this.move.moveY(y);
	}
	public void setMass(double x) {
		this.mass.setMass(x);
	}
	public Pair<Double> getAcceleration() {
		return acceleration.getAcceleration();
	}
	public Pair<Double> getMove() {
		return move.getMove();
	}
	public double getMass() {
		return mass.getMass();
	}
	public boolean getClear() {
		return clear.getClear();
	}
	public boolean getGround() {
		return ground.getGround();
	}
	public Pair<Double> getForce() {
		return force.getForce();
	}
	public Pair<Double> getVelocity() {
		return velocity.getVelocity();
	}
	public Pair<Double> getPosition() {
		return position.getPosition();
	}
	public boolean getOnground() {
		return onground.getOnground();
	}
	public double getTime() {
		return time.getTime();
	}
	public boolean getGameover() {
		return gameover.getGameover();
	}
}