public static void Main()
        {
            Ninja ninja = new Ninja("Gogo");

            string name = RandomeEvilName.RandomName(RandomeEvilName.JediNames);
            string second = RandomeEvilName.RandomName(RandomeEvilName.RobotNames);
            string trd = RandomeEvilName.RandomName(RandomeEvilName.AssasinNames);
            Console.WriteLine(name);
            Console.WriteLine(second);
            Console.WriteLine(trd);

            Console.WriteLine(ninja.Cash);

            Bag<IItem> check = new Bag<IItem>() {

                new SpecialPower(AttackTypeEnum.ForceAttack, "Name", 12, 12, 12),
                new Recreation("recreation"),
                new Energizer(EnergizerEnum.Bgurger, "energy")
            };

            check.Insert(0, new Recreation("ssss"));

            foreach (IItem item in check)
            {
                Console.WriteLine(item);
            }
        }
        public void Apply(Ninja ninja)
        {
            if (!isBossDefeated)
            {
                Evil enemy = new Boss();

                Arena fight = new Arena(string.Format("Going for the {0}", BuildingName), FightRulesEnum.BalancedFight, ninja, enemy);

                fight.Fight();

                if (fight.IsNinjaWiner)
                {
                    isBossDefeated = true;
                    this.Congratulations();
                }
                else
                {
                    // ToDo: for Andrei: ??any string message for the looser
                }
            }
            else
            {
                this.Congratulations();
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="Arena"/> class.
 /// </summary>
 /// <param name="name">The battle name</param>
 /// <param name="fightRules">Fighting rules for damage calculator</param>
 /// <param name="ninja">Our ninja</param>
 /// <param name="creature">Enemy to fight with the ninja</param>
 public Arena(string name, FightRulesEnum fightRules, Ninja ninja, Evil creature)
     : base(name)
 {
     this.fightRules = fightRules;
     this.creature = creature;
     this.ninja = ninja;
     HitCalculator.SetFightRusles(fightRules);
 }
        public void ApplyForJob(Ninja ninja, Job chosenJob)
        {
            Evil enemy = this.ChooseEnemy(chosenJob);

            Arena fight = new Arena(string.Format("Fighting for '{0}' position", chosenJob.Possition), chosenJob.JobFightRules, ninja, enemy);

            fight.Fight();

            if (fight.IsNinjaWiner)
            {
                this.RewardNinja(ninja, chosenJob);
            }
            else
            {
                // ToDo: ??any string message for the looser
            }
        }
        /// <summary>
        /// Sending ninja to fight
        /// </summary>
        /// <param name="ninja">ninja's instance</param>
        public void Study(Ninja ninja)
        {
            Evil enemy = new Bot(ninja.MentalLevel + 1);

            Arena fight = new Arena(string.Format("Learning {0}", ListOfPowers[ninja.MentalLevel]), FightRulesEnum.MentalFight, ninja, enemy);

            fight.Fight();

            if (fight.IsNinjaWiner)
            {
                if (ninja.UpMentalLevel())
                {
                    ninja.GetItem(ListOfPowers[ninja.MentalLevel - 2]);
                }
            }
            else
            {
                // ToDo: for Andrei: ??any string message for the looser
            }
        }
        public void Sell(ICommercial commercialItem, Ninja ninja)
        {
            // If ninja have enough money to pay, he pays
            if (ninja.PayForItem(commercialItem))
            {
                // If ninja accepts the item he takes it
                if (ninja.GetItem(commercialItem as Item))
                {
                    int index = this.goods.IndexOf(commercialItem);
                    this.goods.RemoveAt(index);

                    var itemRecharge = commercialItem.Clone();
                    this.goods.Insert(index, itemRecharge as ICommercial);
                }
                else
                {
                    // Return money
                    ninja.GetCash(commercialItem.Price);
                }
            }
        }
        public List<Job> GenerateJobsFor(Ninja ninja)
        {
            List<Job> listOfJobs = new List<Job>();

            var physicalJobNames = PhysicalWorkEnum.GetNames(typeof(PhysicalWorkEnum));
            foreach (var jobName in physicalJobNames)
            {
                PhysicalWorkEnum job = (PhysicalWorkEnum)Enum.Parse(typeof(PhysicalWorkEnum), jobName);
                if ((int)job >= (ninja.ForceLevel - 1) &&
                    (int)job <= (ninja.ForceLevel + 1))
                {
                    listOfJobs.Add(new PhysicalJob(job));
                }
            }

            var headworkNames = HeadworkEnum.GetNames(typeof(HeadworkEnum));
            foreach (var jobName in headworkNames)
            {
                HeadworkEnum job = (HeadworkEnum)Enum.Parse(typeof(HeadworkEnum), jobName);
                if ((int)job >= (ninja.MentalLevel - 1) &&
                    (int)job <= (ninja.MentalLevel + 1))
                {
                    listOfJobs.Add(new MentalJob(job));
                }
            }

            var balancedJobNames = BalancedJobEnum.GetNames(typeof(BalancedJobEnum));
            foreach (var jobName in balancedJobNames)
            {
                BalancedJobEnum job = (BalancedJobEnum)Enum.Parse(typeof(BalancedJobEnum), jobName);
                if ((int)job >= (((ninja.ForceLevel + ninja.MentalLevel) / 2) - 1) &&
                    (int)job <= (((ninja.ForceLevel + ninja.MentalLevel) / 2) + 1))
                {
                    listOfJobs.Add(new BalancedJob(job));
                }
            }

            return listOfJobs;
        }
 private void RewardNinja(Ninja ninja, Job chosenJob)
 {
     int ninjaCashReward = chosenJob.Wage;
     ninja.GetCash(ninjaCashReward);
 }