// function to choose strategy to be used private Strategy getStrategy(Snapshot snapshot) { // get all objects Robot ourRobot = snapshot.getBalle(); RectangularObject dribbleBox = ourRobot.getFrontSide().extendBothDirections(0.01).widen(0.25); addDrawable(new DrawableRectangularObject(dribbleBox, Color.CYAN)); System.out.println((boolean) ((CurvyIntercept) Intercept).isDone()); if (!(boolean) ((CurvyIntercept) Intercept).isDone()) { addDrawables(Intercept.getDrawables()); return Intercept; } else { return Score; } }