Ejemplo n.º 1
0
        public void HeroCanCreateAnIntegerValueRepresentingRoundsAttackDamage()
        {
            ICharacter    hero    = new Hero("Meh", 100, 100, 25);
            ICharacter    monster = new Monster("Bob", 100, 44);
            IRoundActions actions = new RoundActions();

            var heroAttackDamage = actions.Attack(hero);

            Assert.AreEqual(26, heroAttackDamage);
        }
Ejemplo n.º 2
0
        public void CanAssignRandomValueToAttack()
        {
            ICharacter    character = new Character("Blbdfd", 100, 100, 5);
            IRoundActions actions   = new RoundActions();


            var attackDamage = actions.Attack(character);

            Assert.AreEqual(6, attackDamage);
        }
Ejemplo n.º 3
0
        public void CanDecrementStatsBasedOnAttackDamage()
        {
            ICharacter    character = new Character("bsedrfsdf", 100, 100, 5);
            IRoundActions actions   = new RoundActions();

            var attackDamage = actions.Attack(character);

            character = DecrementStats.DecrementHealthPoints(character, attackDamage);

            Assert.AreEqual(95, character.HitPoints);
        }
Ejemplo n.º 4
0
        public void CanMitigateDamageBasedOnBlockValue()
        {
            ICharacter    character  = new Character("vdisosdf", 100, 100, 20);
            ICharacter    character2 = new Character("monster", 100, 100, 10);
            IRoundActions actions    = new RoundActions();

            var attackDamage           = actions.Attack(character);
            var attackDamageAfterBlock = actions.Block(attackDamage);

            Assert.AreEqual(6, attackDamageAfterBlock);
            Assert.AreEqual(9, attackDamageAfterBlock);
        }