public CommandInformation convertCommand(String command) {
        command=command.toLowerCase() ;
        if(isQuery(command)) {
            return new CommandInformation(CommandType.QUERY);
        }else if(isRoll(command)){
            return new CommandInformation(CommandType.ROLL);
        }else if(isRobot(command)) {
            return new CommandInformation(CommandType.ROBOT);
        } else if (isHelp(command)) {
            return new CommandInformation(CommandType.HELP);
        } else if (isQuit(command)) {
            return new CommandInformation(CommandType.QUIT);
        } else if(isBlock(command)) {
            return new CommandInformation(CommandType.BLOCK,Distance(command, "block "));
        } else if(isBomb(command)) {
            return new CommandInformation(CommandType.BOMB,Distance(command, "bomb "));
        } else if(isSell(command)) {
            return new CommandInformation(CommandType.SELL,Distance(command,"sell "));
        }  else if(isSellTool(command)) {
            return new CommandInformation(CommandType.SELLTOOL,Distance(command,"selltool "));
        }  else{
           throw new CommandException("Command error");
        }
    }