Example #1
0
 public bool RemoveCharacter(CharacterWeapon characterWeapon)
 {
     if (CharacterWeapons.Contains(characterWeapon))
     {
         CharacterWeapons.Remove(characterWeapon);
         return(true);
     }
     return(false);
 }
Example #2
0
        public bool AddCharacter(CharacterWeapon characterWeapon)
        {
            var character = CharacterWeapons.FirstOrDefault(c => c.Character == characterWeapon.Character);

            if (CharacterWeapons.Count < 5 && character != null)
            {
                CharacterWeapons.Add(characterWeapon);
                return(true);
            }
            return(false);
        }