package design.model.holeplay; import design.model.Hole; public class SetupState implements HoleState { @Override public void enter(HolePlayContext ctx) { /* no-op */ } @Override public void handleStart(HolePlayContext ctx) { // Pull current hole number & par from Round/Course Hole start = ctx.getRound().getStartingHole(); // or compute from current-hole tracking if you add it ctx.beginNewPlay(start.getNumber(), start.getPar()); ctx.setState(new PlayState()); } @Override public void handleShot(HolePlayContext ctx, design.model.Club club, Integer distanceYds) { throw new IllegalStateException("Cannot record a shot during setup."); } @Override public void handleHoleOut(HolePlayContext ctx) { throw new IllegalStateException("Cannot hole out during setup."); } @Override public String name() { return "SetupState"; } }