public void GivenASorcerorLevel_SpellArrayIsReturned(int level, int[] expectedSpells)
 {
     PlayerClass player = new Sorcerer();
     player.AssignLevel(level);
     player.GetClassSpellsPerDay();
     int[] actual = player.Magic.ClassSpellsPerDay;
     Assert.AreEqual(expectedSpells, actual);
 }
 public void Init()
 {
     Sorcerer = new Sorcerer();
 }
        public void Given_Then_Returned()
        {
            // Arrange
            PlayerClass pc = new Sorcerer();

            // Act
            pc.GetSpellDifficultyClass();
            int[] actual = pc.Magic.SpellDC;

            // Assert
            Assert.IsNull(actual);
        }
Exemple #4
0
 public void CreatePlayerClass(string playerClass)
 {
     switch (playerClass)
     {
         case "Barbarian":
             PlayerClass = new Barbarian();
             break;
         case "Bard":
             PlayerClass = new Bard();
             break;
         case "Cleric":
             PlayerClass = new Cleric();
             break;
         case "Druid":
             PlayerClass = new Druid();
             break;
         case "Fighter":
             PlayerClass = new Fighter();
             break;
         case "Monk":
             PlayerClass = new Monk();
             break;
         case "Paladin":
             PlayerClass = new Paladin();
             break;
         case "Ranger":
             PlayerClass = new Ranger();
             break;
         case "Rogue":
             PlayerClass = new Rogue();
             break;
         case "Sorcerer":
             PlayerClass = new Sorcerer();
             break;
         case "Wizard":
             PlayerClass = new Wizard();
             break;
     }
 }