Beispiel #1
0
 public void AddArmor(Armor armor)
 {
     if (!armors.ContainsKey(armor.Name))
     {
         armors.Add(armor.Name, armor);
     }
 }
Beispiel #2
0
        public override object Clone()
        {
            string[] allowedClasses = new string[allowableClasses.Count];

            for (int i = 0; i < allowableClasses.Count; i++)
            {
                allowedClasses[i] = allowableClasses[i];
            }

            Armor armor = new Armor(Name, Type, Price, Weight, Location, DefenseValue, DefenseModifier, allowedClasses);

            return armor;
        }