예제 #1
0
 public TC()
 {
     LPanel = new Panel.Panel(Directory.GetCurrentDirectory());
     RPanel = new Panel.Panel(Directory.GetCurrentDirectory());
     Copy   = new Copy.Copy();
 }
예제 #2
0
 public TC(string path)
 {
     LPanel = new Panel.Panel(path);
     RPanel = new Panel.Panel(path);
     Copy   = new Copy.Copy();
 }
예제 #3
0
파일: Panel.cs 프로젝트: drusepth/Panel
        public Panelist(Panel panel, int num_traits)
        {
            RNG = new Random();
            belongs_to = panel;

            // Copy over this List so we can easily avoid duplicate traits
            List<Trait> potential_traits = new List<Trait>(panel.Traits);

            // Ensure we're not trying to add more traits than available
            if (num_traits > potential_traits.Count - 1)
            {
                num_traits = potential_traits.Count - 1;
            }

            // Assign random traits to this panelist
            for (int i = 0; i < num_traits; i++)
            {
                int t = RNG.Next(potential_traits.Count);
                traits.Add(potential_traits[t]);
                potential_traits.RemoveAt(t);
            }
        }