Exemplo n.º 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));
     }
 }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }