Example #1
0
        private Dictionary <string, TriadGameModifier> BuildRuleNameMap()
        {
            Dictionary <string, TriadGameModifier> ruleMap = new Dictionary <string, TriadGameModifier>();

            foreach (Type type in Assembly.GetAssembly(typeof(TriadGameModifier)).GetTypes())
            {
                if (type.IsSubclassOf(typeof(TriadGameModifier)))
                {
                    TriadGameModifier modInst = (TriadGameModifier)Activator.CreateInstance(type);
                    ruleMap.Add(modInst.GetName(), modInst);
                }
            }

            return(ruleMap);
        }
Example #2
0
 public override string GetName()
 {
     return(RuleName + (RuleInst != null ? " (" + RuleInst.GetName() + ")" : ""));
 }