示例#1
0
        public void setPoules(Dictionary <int, int> poules)
        {
            int i;
            int index = 0;

            foreach (KeyValuePair <int, int> nb in poules)
            {
                for (i = 0; i < nb.Value; i++)
                {
                    index++;
                    Poule nPoule = new Poule(nb.Key);
                    this.Poules[index] = nPoule;
                }
            }
            index = 1;
            foreach (KeyValuePair <int, Equipe> equ in this.Equipes)
            {
                if (this.Poules[index].isFull())
                {
                    index++;
                }
                this.Poules[index].Equipes[equ.Key] = equ.Value;
                equ.Value.poule = this.Poules[index];
            }
        }
示例#2
0
 public Match(Equipe equ1, Equipe equ2)
 {
     this.Equipes[equ1.id] = equ1;
     this.Equipes[equ2.id] = equ2;
     this.poule            = equ1.poule;
 }