吐き出したコードを一新しました.
1 parent 7bed4b4 commit 7696d5c145df0fab017747869fb637cc0733c1f3
k-fujii authored on 11 Nov 2021
Showing 12 changed files
View
25
src/Acceleration.java 100644 → 0
import java.util.*;
 
public class Acceleration {
private double mass;
private Map.Entry<Double, Double> force;
private Velocity velocity;
private Onground onground;
private Map.Entry<Double, Double> acceleration;
public void updateMass(double mass) {
this.mass = mass;
acceleration = (this.onground.getOnground() ? new AbstractMap.SimpleEntry<>((force.getKey()/mass), 0.0) : new AbstractMap.SimpleEntry<>((force.getKey()/mass), (force.getValue()/mass)));
velocity.updateAcceleration(acceleration);
}
public void updateForce(Map.Entry<Double, Double> force) {
this.force = force;
acceleration = (this.onground.getOnground() ? new AbstractMap.SimpleEntry<>((force.getKey()/mass), 0.0) : new AbstractMap.SimpleEntry<>((force.getKey()/mass), (force.getValue()/mass)));
velocity.updateAcceleration(acceleration);
}
public Acceleration(Velocity velocity, Onground onground) {
this.onground = onground;
}
public Map.Entry<Double, Double> getAcceleration() {
return acceleration;
}
}
View
11
src/Clear.java 100644 → 0
import java.util.*;
 
public class Clear {
private Position position;
public Clear(Position position) {
this.position = position;
}
public boolean getClear() {
return ((this.position.getPosition().getKey()>100.0) ? true : false);
}
}
View
src/Force.java 100644 → 0
View
src/Gameover.java 100644 → 0
View
src/Ground.java 100644 → 0
View
src/JumpGame.java 100644 → 0
View
src/Mass.java 100644 → 0
View
src/Move.java 100644 → 0
View
src/Onground.java 100644 → 0
View
src/Position.java 100644 → 0
View
src/Time.java 100644 → 0
View
src/Velocity.java 100644 → 0