Пример #1
0
 public void drawTest()
 {
     Deck target = new Deck(); // TODO: Initialize to an appropriate value
     Card expected = new DefenceCard(5); // TODO: Initialize to an appropriate value
     Card actual;
     actual = target.draw();
     Assert.AreEqual(expected.getValue(), actual.getValue(),"The Value is not equal.");
 }
Пример #2
0
 public Player(int deckScore)
 {
     myDeck = new Deck(deckScore);
     hand = new List<Card>(5);
     for (int i = 0; i < 5; i++)
     {
         draw();
     }
 }
Пример #3
0
 public void shuffleTest()
 {
     Deck target = new Deck(); // TODO: Initialize to an appropriate value
     target.shuffle();
     Card expected = new DefenceCard(5); // TODO: Initialize to an appropriate value
     Card actual;
     actual = target.draw();
     //NOTE! THIS IS AN UNPREDICTABLE TEST. I'm using it as an initial check for shuffling,
     //but there's a good chance it will fail just because of the luck of the draw.
     Assert.AreEqual(expected.getValue(), actual.getValue(), "The deck has not been shuffled.");
 }
Пример #4
0
 public Player(int initialHealth, int initialDefence, string n, int deckScore)
 {
     name = n;
     health = initialHealth;
     defence = initialDefence;
     myDeck = new Deck(deckScore);
     hand = new List<Card>(5);
     for (int i = 0; i < 5; i++)
     {
         draw();
     }
 }