Exemple #1
0
        public Dictionary <String, Outfit> GenerateOutfit(Dictionary <String, byte> e = null, Wardrobe ward = null)
        {
            if (e != null)
            {
                this.events = e;
            }
            if (ward != null)
            {
                this.wardrobe = ward;
            }
            Dictionary <String, Outfit> finalOutfits = new Dictionary <String, Outfit>();
            Outfit currentOutfit = null;

            //Stopwatch time = new Stopwatch();
            //time.Start();
            this.wardrobe.Shuffle();
            foreach (var item in events.Keys)
            {
                if (events[item] != 0b0)
                {
                    currentOutfit = ChooseOutfit(events[item]);
                    finalOutfits.Add(item, currentOutfit);
                }
            }
            //time.Stop();
            //Console.WriteLine(time.ElapsedMilliseconds);
            return(finalOutfits);
        }
Exemple #2
0
 public Creator(Dictionary <String, byte> events, Wardrobe ward)
 {
     finalOutfits = new Dictionary <string, Outfit>();
     predefineOutfitDict();
     this.events   = events;
     this.wardrobe = ward;
 }