Beispiel #1
0
        public void checkEnemyDrop()
        {
            GameData.Models.Item item1 = new GameData.Models.Item();
            GameData.Models.Item item2 = new GameData.Models.Item();

            List <GameData.Models.Item> items = new List <GameData.Models.Item>();

            items.Add(item1);
            items.Add(item2);

            RobesAndArmorGit.Logic.EnemyDropCalc enemyDropCalc = new RobesAndArmorGit.Logic.EnemyDropCalc();


            //   Assert.Equal(item1, enemyDropCalc.calcDrop(items));
        }
Beispiel #2
0
        public GameData.Models.Item calcDrop(List <GameData.Models.Item> dropItems)
        {
            Random rnd = new Random();


            //add x empty items to create an harder drop system
            for (int i = 0; i < 10; i++)
            {
                GameData.Models.Item item = new GameData.Models.Item();
                dropItems.Add(item);
            }
            int index = rnd.Next(dropItems.Count);

            return(dropItems[index]);
        }
Beispiel #3
0
        public void testCheckEquipemnt()
        {
            GameData.Models.Item item = new GameData.Models.Item();
            GameData.Models.Type type = new GameData.Models.Type();
            type.Name = "head";
            type.Id   = 1;


            item.Type = type;
            item.Id   = 1;

            GameData.Models.Equipment equipment = new GameData.Models.Equipment();

            RobesAndArmorGit.Logic.Equiping equiping = new RobesAndArmorGit.Logic.Equiping();

            Assert.Equal(1, equiping.CheckType(item, equipment).headId);
        }