private int newPuzzleReader() {
        int nextPuzzle;
        String input = newPuzzleNumber.getText();
        try {
            nextPuzzle = Integer.valueOf(input);
        } catch (NumberFormatException e) {
            nextPuzzle = makeRandomNumber();
        }
        if (nextPuzzle < 1) {
            nextPuzzle = makeRandomNumber();
        }
        return nextPuzzle;
    }