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)); } }
public Stat(StatName name, StatValue value, StatWeighting weighting) { Name = name; Value = value; Weighting = weighting; }