!7 sS yesText = [[ y yes yeah y yup yo correct sure ok affirmative ja ok richtig gut mach das ja ich will bitte ist so isso jau jawohl stimmt ]]; sS noText = [[ no n nope negative don't do that nay nein nö negativ lass das ]]; static Set yesLiterals, noLiterals; static Bool algo_0_1(S s) { if (yesLiterals.contains(s)) true; if (noLiterals.contains(s)) false; null; } static Bool algo_0_2(S s) { s = trim(s); try bool algo_0_1(s); S s2 = collapseWord(s); if (neq(s, s2)) try bool algo_0_1(s2); null; } p { readLinePrefix("[] Eingabe: "); yesLiterals = tlftj_asCISet(yesText); noLiterals = tlftj_asCISet(noText); bot(); centerBigConsole2(); focusConsole(random(tossCoin() ? yesLiterals : noLiterals); showControls2(jcenteredlabel("Schreib doch mal was ja-iges oder nein-iges:")); showControls(withCenteredTitle("_ Feedback _", centeredButtons( "Das ist korrekt", r { print("=> CORRECT"); uploadOutputSinceLastInput() }, "Das ist nicht korrekt", r { print("=> UNCORRECT"); uploadOutputSinceLastInput() }))); } answer { Bool b = algo_0_2(s); try answer quote(s) + " " + ( isTrue(b) ? "bedeutet 'Ja'" : isFalse(b) ? "bedeutet 'Nein'" : " bedeutet weder Ja noch Nein"); }