public int getInt(int index, int length) {

        // User input.
        List<String> words = this.getParser().getInput();

        if (!words.isEmpty()) {

            try {

                index = Integer.parseInt(words.get(0));

                // Index out of bounds.
                if (index >= 0 && index < length) {

                    return index;
                }
            } catch (NumberFormatException e) {

            }
        }

        System.out.println("Incorrect number.");

        return this.getInt(index, length);
    }