Exemplo n.º 1
0
        public override void Execute()
        {
            string  weaponName    = this.args[1];
            IWeapon currentWeapon = this.weapons.FirstOrDefault(w => w.Name.Equals(weaponName));

            if (!Validator.IsNull(currentWeapon))
            {
                currentWeapon.CalculateStats();
                OutputHandler.WriteMessageInConsole(currentWeapon.ToString());
            }
            else
            {
                throw new ArgumentException("Weapon not found.");
            }
        }