package entities; public class Ground { private Onground onground; private boolean value = true; public Ground(Onground onground) { this.onground = onground; } public void closeHole() { this.value = true; onground.updateGround(value); } public void openHole() { this.value = false; onground.updateGround(value); } public boolean getValue() { return value; } }