Exemplo n.º 1
0
        private Dictionary <string, TriadGameModifier> BuildRuleNameMap()
        {
            var ruleMap = new Dictionary <string, TriadGameModifier>();

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

            return(ruleMap);
        }
Exemplo n.º 2
0
 public override string GetCodeName()
 {
     return(base.GetCodeName() + (RuleInst != null ? (" (" + RuleInst.GetCodeName() + ")") : ""));
 }