public override bool Execute(RobozzlePuzzle owner, int depth) { return base.Execute(() => { for (int i = 0; i < owner.Functions[this.Function].Length; i++) { owner.CallOnRunStep(); if (owner.StarsLeft == 0) return true; Instruction func = owner.Functions[this.Function][i]; if (func == null) continue; if (!func.Execute(owner, depth + 1)) { owner.CallOnRunStep(); return false; } } return true; }, owner, depth); }