示例#1
0
 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));
     }
 }
示例#2
0
        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);
        }
示例#3
0
        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);
        }