// 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); }
// 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)); }