public bool addGetWeapons(Unit unit, Weapon weapon, string expectedValue) { unit.addWeapon(weapon); List<Weapon> weapons = unit.Weapons; Weapon returnedWeapon = weapons[weapons.IndexOf(weapon)]; return (returnedWeapon.name == expectedValue); }
public bool addGetWeapons(Unit unit, Weapon weapon) { unit.addWeapon(weapon); return (unit.Weapons.Contains(weapon)); }