示例#1
0
 public void GetClassAllignments()
 {
     //Arrange
     PlayerClass pc = new Fighter();
     //Act
     string[] actual = pc.ClassAlignments;
     string[] expected = {"Lawful Good", "Lawful Neutral", "Lawful Evil", "Neutral Good", "True Neutral", "Neutral Evil",
         "Chaotic Good", "Chaotic Neutral", "Chaotic Evil"};
     //Assert
     Assert.AreEqual(expected, actual);
 }
示例#2
0
 public void Init()
 {
     Fighter = new Fighter();
 }
示例#3
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;
     }
 }