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