private boolean send(String cmd, StringBuilder response) { try { response.append(m_gtp.send(cmd)); return true; } catch (GtpError error) { response.append(error.getMessage()); return false; } }
private void listCommands() { try { m_gtp.querySupportedCommands(); } catch (GtpError error) { System.out.println(error.getMessage()); return; } ArrayList<String> commands = m_gtp.getSupportedCommands(); for (int i = 0; i < commands.size(); ++i) System.out.println(commands.get(i)); }