protected final String getCommand() throws MenuException{

        // Scanner inFile = Memorygame.getInputFile();
        Scanner inFile = new Scanner(System.in);
        String command;
        boolean valid = false;
        do {
            command = inFile.nextLine();
            command = command.trim().toUpperCase();
            valid = validCommand(command);
            if (!validCommand(command)) {
               throw new MenuException(ErrorType.ERROR3.getMessage());
                //continue;
            }                
            return command;
        
        } while (!valid);
    }