public DossierData(Dossier dossier, GameObject knower) { knowerID = knower.ID; tuples = new List <Tuple <int, int> >(); foreach (KeyValuePair <GameObject, int> pair in dossier) { tuples.Add(new Tuple <int, int>(pair.Key.ID, pair.Value)); } }
public static Dossier operator &(Dossier a, Dossier b) { Dossier c = new Dossier(); foreach (GameObject obj in a.Keys) { c[obj] = Math.Min(a[obj], b[obj]); } return(c); }
public Dossier Choose(IAgent agent, bool maxUnchosen) { Dossier dossier = new Dossier(); foreach (GameObject obj in dossier.Keys) { if (obj.affiliation == agent) { dossier[obj] = this[obj]; } else if (maxUnchosen) { dossier[obj] = int.MaxValue; } } return(dossier); }