Пример #1
0
		/// 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 );
		}
Пример #2
0
 /// 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);
     }
 }
Пример #3
0
		/*! 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;
		}
Пример #4
0
        /*! 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);
        }