private boolean inputValid(final int width, final int height, String code) {
        if (width < minWidth || height < minHeight
                || width > maxWidth || height > maxHeight
                || code.length() < minWidth * minHeight || code.length() > maxWidth * maxHeight) {
            return false;
        } else {
            return true;
        }
    }