コード例 #1
0
ファイル: PlayerClass.cs プロジェクト: Kindlar/Character-Gen
        public virtual void CalculateBaseAttack()
        {
            BaseAttackModifier baseAttack = new BaseAttackModifier();

            Attack.BaseAttack      = baseAttack.GetBaseAttack(PlayerLevel, ChosenClass);
            Attack.BaseAttackTotal = baseAttack.BaseAttackString(Attack.BaseAttack);
        }
コード例 #2
0
        public void Level1FightReturns1()
        {
            BaseAttackModifier bAttack = new BaseAttackModifier();
            int expected = 1;
            int actual   = bAttack.GetBaseAttack(1, "Fighter");

            Assert.AreEqual(expected, actual);
        }
コード例 #3
0
        public void BadDataToHitException()
        {
            BaseAttackModifier bAttack = new BaseAttackModifier();
            int expected = -999;
            int actual   = bAttack.GetBaseAttack(99, "");

            Assert.AreEqual(expected, actual);
        }
コード例 #4
0
        public void Level1NullReturns0()
        {
            BaseAttackModifier bAttack = new BaseAttackModifier();
            int expected = 1;
            int actual   = bAttack.GetBaseAttack(1, "");

            Assert.AreEqual(expected, actual);
        }
コード例 #5
0
        public void Level11ClericReturns83()
        {
            BaseAttackModifier bAttack = new BaseAttackModifier();
            int expected = 8;
            int actual   = bAttack.GetBaseAttack(11, "Cleric");

            Assert.AreEqual(expected, actual);
        }
コード例 #6
0
        public void Level20SorcererReturns105()
        {
            BaseAttackModifier bAttack = new BaseAttackModifier();
            int expected = 10;
            int actual   = bAttack.GetBaseAttack(20, "Sorcerer");

            Assert.AreEqual(expected, actual);
        }