svoid nlLogic_fillBattleSpace_withFailed(NLLogicChecker_v2 c, final L battleSpace, bool debug) { VF2 onRuleFired = voidfunc(IfThen rule, NLLogicChecker_v2.Matching m) { battleSpace.add(new RuleWithParams(rule, m.matches)); }; VF3 onRuleFailed = voidfunc(IfThen rule, NLLogicChecker_v2.Matching m, Exp remaining) { battleSpace.add(new FailedRule(rule, m.matches, remaining)); }; if (c.useIterate) { print("Iterating over " + n2(c.rules, "rule")); applyNLLogicFacts_v4_iterate_withFailed_verbose.set(debug); applyNLLogicFacts_v4_iterate_withFailed(c, onRuleFired, onRuleFailed, c.rules); } else { applyNLLogicFacts_v4_verbose.set(debug); applyNLLogicFacts_v4(c, onRuleFired, c.rules); } }