/// A positive iThinkFact is added to the \a State, and a negative one is removed from it. public void applyFact( iThinkState State ) { if ( this.positive == false ) State.delFact( this ); else State.addFact( this ); }
/// A positive iThinkFact is added to the \a State, and a negative one is removed from it. public void applyFact(iThinkState State) { if (this.positive == false) { State.delFact(this); } else { State.addFact(this); } }
/*! Returns a new iThinkState, applying only positive effects of this action */ public iThinkState applyPositiveEffects( iThinkState State ) { iThinkState NewState = new iThinkState( State ); foreach ( iThinkFact effect in this.effects ) { if (effect.getPositive()) NewState.addFact(effect); } return NewState; }
/*! Returns a new iThinkState, applying only positive effects of this action */ public iThinkState applyPositiveEffects(iThinkState State) { iThinkState NewState = new iThinkState(State); foreach (iThinkFact effect in this.effects) { if (effect.getPositive()) { NewState.addFact(effect); } } return(NewState); }