diff --git a/src/Acceleration.java b/src/Acceleration.java index f3b962d..5a9ae7e 100644 --- a/src/Acceleration.java +++ b/src/Acceleration.java @@ -5,7 +5,7 @@ private double mass; private Velocity velocity; private Onground onground; - private Pair acceleration; + private Pair value; public void updateForce(Pair force) { this.force = force; @@ -15,8 +15,8 @@ } else { temp_l3 = new Pair<>((force.getFirst() / mass), (force.getSecond() / mass)); } - acceleration = temp_l3; - velocity.updateAcceleration(acceleration); + value = temp_l3; + velocity.updateAcceleration(value); } public void updateMass(double mass) { @@ -27,15 +27,15 @@ } else { temp_l6 = new Pair<>((force.getFirst() / mass), (force.getSecond() / mass)); } - acceleration = temp_l6; - velocity.updateAcceleration(acceleration); + value = temp_l6; + velocity.updateAcceleration(value); } public Acceleration(Velocity velocity, Onground onground) { this.onground = onground; } - public Pair getAcceleration() { - return acceleration; + public Pair getValue() { + return value; } } \ No newline at end of file diff --git a/src/Force.java b/src/Force.java index 43ddf98..ac7c47f 100644 --- a/src/Force.java +++ b/src/Force.java @@ -2,15 +2,15 @@ public class Force { private Acceleration acceleration; - private Pair force; + private Pair value; public Force(Acceleration acceleration) { this.acceleration = acceleration; } public void gravity(double y) { - this.force = new Pair<>(0.0, y); - acceleration.updateForce(force); + this.value = new Pair<>(0.0, y); + acceleration.updateForce(value); } - public Pair getForce() { - return force; + public Pair getValue() { + return value; } } \ No newline at end of file diff --git a/src/Ground.java b/src/Ground.java index f3dfaf8..249ad73 100644 --- a/src/Ground.java +++ b/src/Ground.java @@ -1,8 +1,8 @@ import java.util.*; public class Ground { - private boolean ground; - public boolean getGround() { - return ground; + private boolean value; + public boolean getValue() { + return value; } } \ No newline at end of file diff --git a/src/Mass.java b/src/Mass.java index c381628..e98938a 100644 --- a/src/Mass.java +++ b/src/Mass.java @@ -2,15 +2,15 @@ public class Mass { private Acceleration acceleration; - private double mass; + private double value; public Mass(Acceleration acceleration) { this.acceleration = acceleration; } - public void setMass(double x) { - this.mass = x; - acceleration.updateMass(mass); + public void setValue(double x) { + this.value = x; + acceleration.updateMass(value); } - public double getMass() { - return mass; + public double getValue() { + return value; } } \ No newline at end of file diff --git a/src/Move.java b/src/Move.java index 02f52d2..0d18dbe 100644 --- a/src/Move.java +++ b/src/Move.java @@ -2,18 +2,18 @@ public class Move { private Velocity velocity; - private Pair move; + private Pair value; public Move(Velocity velocity) { this.velocity = velocity; } public void moveX(double x) { - this.move = new Pair<>(x, this.move.getSecond()); - velocity.updateMove(move); + this.value = new Pair<>(x, this.value.getSecond()); + velocity.updateMove(value); } public void moveY(double y) { - this.move = new Pair<>(this.move.getFirst(), y); + this.value = new Pair<>(this.value.getFirst(), y); } - public Pair getMove() { - return move; + public Pair getValue() { + return value; } } \ No newline at end of file diff --git a/src/Position.java b/src/Position.java index e102308..e132696 100644 --- a/src/Position.java +++ b/src/Position.java @@ -2,20 +2,20 @@ public class Position { private Ground ground; - private Pair position; + private Pair value; public void updateVelocity(Pair velocity) { Pair temp_l4; - if(((this.ground.getGround()==true)&&((this.position.getSecond()+(0.01*velocity.getSecond()))<0.0))) { - temp_l4 = new Pair<>((this.position.getFirst()+(0.01*velocity.getFirst())), 0.0); + if(((this.ground.getGround()==true)&&((this.value.getSecond()+(0.01*velocity.getSecond()))<0.0))) { + temp_l4 = new Pair<>((this.value.getFirst()+(0.01*velocity.getFirst())), 0.0); } else { - temp_l4 = new Pair<>((this.position.getFirst()+(0.01*velocity.getFirst())), (this.position.getSecond()+(0.01*velocity.getSecond()))); + temp_l4 = new Pair<>((this.value.getFirst()+(0.01*velocity.getFirst())), (this.value.getSecond()+(0.01*velocity.getSecond()))); } - position = temp_l4; + value = temp_l4; } public Position(Ground ground) { this.ground = ground; } - public Pair getPosition() { - return position; + public Pair getValue() { + return value; } } \ No newline at end of file diff --git a/src/Time.java b/src/Time.java index cf5540a..ec23892 100644 --- a/src/Time.java +++ b/src/Time.java @@ -1,11 +1,11 @@ import java.util.*; public class Time { - private double time; + private double value; public void gravity(double y) { - this.time = (this.time+0.01); + this.value = (this.value +0.01); } - public double getTime() { - return time; + public double getValue() { + return value; } } \ No newline at end of file diff --git a/src/Velocity.java b/src/Velocity.java index af0c2c7..89bb343 100644 --- a/src/Velocity.java +++ b/src/Velocity.java @@ -5,33 +5,33 @@ private Pair acceleration; private Position position; private Onground onground; - private Pair velocity; + private Pair value; public void updateMove(Pair move) { this.move = move; Pair temp_l0; if((this.onground.getOnground()&&(move.getSecond()>=0.0))) { temp_l0 = move; } else { - temp_l0 = this.velocity; + temp_l0 = this.value; } - velocity = temp_l0; - position.updateVelocity(velocity); + value = temp_l0; + position.updateVelocity(value); } public void updateAcceleration(Pair acceleration) { this.acceleration = acceleration; Pair temp_l2; - if((this.onground.getOnground()&&(this.velocity.getSecond()<0.0))) { - temp_l2 = new Pair<>((this.velocity.getFirst()+(0.01*acceleration.getFirst())), 0.0); + if((this.onground.getOnground()&&(this.value.getSecond()<0.0))) { + temp_l2 = new Pair<>((this.value.getFirst()+(0.01*acceleration.getFirst())), 0.0); } else { - temp_l2 = new Pair<>((this.velocity.getFirst()+(0.01*acceleration.getFirst())), (this.velocity.getSecond()+(0.01*acceleration.getSecond()))); + temp_l2 = new Pair<>((this.value.getFirst()+(0.01*acceleration.getFirst())), (this.value.getSecond()+(0.01*acceleration.getSecond()))); } - velocity = temp_l2; - position.updateVelocity(velocity); + value = temp_l2; + position.updateVelocity(value); } public Velocity(Position position, Onground onground) { this.onground = onground; } - public Pair getVelocity() { - return velocity; + public Pair getValue() { + return value; } } \ No newline at end of file