static new L history; p { S hello = null; if (args.length != 0 && args[0].equals("nogfx")) setOpt(getMainClass(), "showPicture", false); try { history.add("*"); //hello = answer("*", history); if (hello == null) hello = "hallo"; } catch (Throwable e) { e.printStackTrace(); return; } say(hello); callOpt(getMainClass(), "happy"); } static void handleText(S s) { print("< " + s); // TODO: fix the java strings umlaut problem final boolean goodbye = match3("goodbye", s) || match3("bye", s) || match3("tsch\u00fcss", s) || match3("tsch\u00fcss ...", s); // get answer history.add(s); S answer; try { answer = goodbye ? "tsch\u00fcss" : answer(s, history); } catch (Throwable e) { e.printStackTrace(); answer = "Fehler"; } if (answer != null) say(answer); if (goodbye) { print("\nGOODBYE!"); callOpt(getMainClass(), "disappear"); } } static void say(S s) { print("> " + s); history.add(s); // TODO: speak? }