Esempio n. 1
0
        public void TestFireVSNormalSpellCards()
        {
            var fire = new FireSpell()
            {
                Damage = 20
            };
            var normal = new NormalSpell()
            {
                Damage = 20
            };

            int fireDamage   = fire.CalculateDamage(normal);
            int normalDamage = normal.CalculateDamage(fire);

            // fire > normal
            Assert.AreEqual(40, fireDamage);
            Assert.AreEqual(10, normalDamage);
        }
Esempio n. 2
0
        public void TestNormalVSWaterSpellCards()
        {
            var normal = new NormalSpell()
            {
                Damage = 20
            };
            var water = new WaterSpell()
            {
                Damage = 20
            };

            int normalDamage = normal.CalculateDamage(water);
            int waterDamage  = water.CalculateDamage(normal);

            // normal > water
            Assert.AreEqual(40, normalDamage);
            Assert.AreEqual(10, waterDamage);
        }
Esempio n. 3
0
        public void TestMixedFightKrakenNormalSpell()
        {
            var kraken = new Kraken()
            {
                Damage = 20
            };
            var normal = new NormalSpell()
            {
                Damage = 20
            };

            int krakenDamage = kraken.CalculateDamage(normal);
            int normalDamage = normal.CalculateDamage(kraken);

            // normal > water
            // kraken not affected by spells
            Assert.AreEqual(10, krakenDamage);
            Assert.AreEqual(0, normalDamage);
        }