Ejemplo n.º 1
0
        public IEnumerable <Stat> Map(IDictionary <string, double> stats)
        {
            for (var index = 0; index < Count; index++)
            {
                var item = this.ElementAt(index);

                var name = item.Key;

                if (!stats.ContainsKey(name))
                {
                    continue;
                }

                var value = new StatValue(stats[name]);

                var weighting = item.Value;

                yield return(new Stat(name, value, weighting));
            }
        }
Ejemplo n.º 2
0
 public Stat(StatName name, StatValue value, StatWeighting weighting)
 {
     Name      = name;
     Value     = value;
     Weighting = weighting;
 }