package resources;
public class Move {
private Velocity velocity;
private Pair<Double> value;
public Move(Velocity velocity) {
this.velocity = velocity;
}
public void moveX(double x) {
this.value = new Pair(x, this.value.getSecond());
velocity.updateByMove(value);
}
public void moveY(double y) {
this.value = new Pair(this.value.getFirst(), y);
}
public Pair<Double> getValue() {
return value;
}
}