| | 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 Force force = new Force(acceleration); |
---|
| | private Mass mass = new Mass(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.setValue(x); |
---|
| | } |
---|
| | |
---|
| | public Map.Entry<Double, Double> getAcceleration() { |
---|
| | return acceleration.getValue(); |
---|
| | } |
---|
| | |
---|
| | public Map.Entry<Double, Double> getMove() { |
---|
| | return move.getValue(); |
---|
| | } |
---|
| | |
---|
| | public double getMass() { |
---|
| | return mass.getValue(); |
---|
| | } |
---|
| | |
---|
| | public boolean getClear() { |
---|
| | return clear.getClear(); |
---|
| | } |
---|
| | |
---|
| | public boolean getGround() { |
---|
| | return ground.getValue(); |
---|
| | } |
---|
| | |
---|
| | public Map.Entry<Double, Double> getForce() { |
---|
| | return force.getValue(); |
---|
| | } |
---|
| | |
---|
| | public Map.Entry<Double, Double> getVelocity() { |
---|
| | return velocity.getValue(); |
---|
| | } |
---|
| | |
---|
| | public Map.Entry<Double, Double> getPosition() { |
---|
| | return position.getValue(); |
---|
| | } |
---|
| | |
---|
| | public boolean getOnground() { |
---|
| | return onground.getOnground(); |
---|
| | } |
---|
| | |
---|
| | public double getTime() { |
---|
| | return time.getValue(); |
---|
| | } |
---|
| | |
---|
| | public boolean getGameover() { |
---|
| | return gameover.getGameover(); |
---|
| | } |
---|
| | } |
---|
| | |
No description provided.
Replace to vector
7e47c3b
intodevelop
fromreplace_to_vector
on 11 Nov 2021replace_to_vector
branch on 11 Nov 2021