!7 static LS questions = ll( "Do you have a car?", "Do you have a girlfriend?", "Do you own a boat?", "Are you tired?", ); concept Answer { S question, answer; } compact module AskYesNoQuestions > DynDialogWithUser { start { db(); if (empty(dialog)) addLine('Computer, random(questions)); onUserInput(voidfunc(S input) { DialogItem q = last(dialog); if (q != null && eqic(q.author, 'Computer)) { Answer a = uniq_sync_returnIfOld(Answer, question := q.line, +answer)); if (a != null) if (match3_noWildcards(a.answer, input)) addLine('Computer, "Yes, I know."); else addLine('Computer, "I thought the answer was " + quote(a.answer) + "?"); else addLine('Computer, "Thanks, saved."); } }); } }