package entities; public class Onground { private boolean ground = true; private Pair<Double> position = new Pair<>(0.0,0.0); private boolean value = true; public void updateGround(boolean ground) { this.ground = ground; value = ((ground==true)&&(position.getRight()<=0.0)); } public void updatePosition(Pair<Double> position) { this.position = position; value = ((ground==true)&&(position.getRight()<=0.0)); } public boolean getValue() { return value; } }