private int generateX() {
        int x = (int) (Math.random() * Game.WIDTH);
        if (x >= 32 && x <= Game.WIDTH - 32
                && (x > handler.playerObject.getX() + 100 || x < handler.playerObject.getX() - 100)) {
            return x;
        } else {
            return generateX();
        }
    }