this.stack.pop();
}
return this.execute(percept);
} // case: next step is an if-then
else if (currentStep instanceof IfStateThenPlan) {
IfStateThenPlan conditional = (IfStateThenPlan) this.stack.pop();
this.stack.push(conditional.ifStateMatches(percept));
return this.execute(percept);
} // case: ignore next step if null
else if (currentStep == null) {
this.stack.pop();
return this.execute(percept);