Code:
PersistantQuestion
active?
mode // key
{key,DrawRnd}
activate(){}
process(t:Str)->Str{
// got answer?
if dic.containsKey(t){mode = t; active = false;}
// nag for answer:
if outputDripper.drip() {result = dic[mode].drawRnd;
if !reult.isEmpty {return result}
else dic[mode].drawRnd.reset(); active = false;
}
}
mode()->Str // end question event when !=""
{
if active return ""
return mode
}
// ensure the waifubot leaves time for user to reply between naggings
outputDriper()->Bool{
return Cycler == 0
}