예제 #1
0
 // Returns the first belief of a certain type and removes it
 public Belief getBelief(String Btype)
 {
     if (this.existBeliefOfType(Btype))
     {
         for (int i = 0; i < beliefs.Count; i++)
         {
             if (beliefType(beliefs.ElementAt(i)) == Btype)
             {
                 Belief b = beliefs.ElementAt(i).Item2;
                 beliefs.RemoveAt(i);
                 return(b);
             }
         }
     }
     return(null);
 }
예제 #2
0
 // creates a new belief. (does not stores it in belief memory).
 public Tuple <String, Belief> createBelief(String Btype, Belief content)
 {
     return(new Tuple <String, Belief>(Btype, content));
 }