private static void InitEntry(string name, object startValue, RunData.EntryType type, System.Func <object, int> weight = null, System.Func <object, string> format = null) { ScoreBoardInfo info = new ScoreBoardInfo(type, format ?? ((o) => o.ToString()), weight ?? ((_) => 10)); ScoreBoardConfig.Add(name, info); CurrentRun.Set(name, startValue); }
public System.Func <object, int> Weighting; // 0 if it should not be shown at all, else 10 should be default public ScoreBoardInfo(RunData.EntryType type, Func <object, string> formatter, Func <object, int> weighting) { Type = type; Formatter = formatter; Weighting = weighting; }