Esempio n. 1
0
        public void LeadingCardTest()
        {
            trick = new Trick();
            trick.AddCardAndPlayer(p1, c1);
            trick.AddCardAndPlayer(p2, c2);

            Assert.AreEqual(c1, trick.LeadingCard());
            Assert.AreNotEqual(c2, trick.LeadingCard());
        }
Esempio n. 2
0
 public void TrickValueTest()
 {
     trick = new Trick();
     trick.AddCardAndPlayer(p1, c1);
     trick.AddCardAndPlayer(p2, c2);
     trick.AddCardAndPlayer(p3, c3);
     trick.AddCardAndPlayer(p4, c4);
     trick.AddCardAndPlayer(p5, c5);
     Assert.AreEqual(17, trick.TrickValue());
 }
Esempio n. 3
0
 public void TheWinnerPlayerTest()
 {
     trick = new Trick();
     trick.AddCardAndPlayer(p1, c1);
     trick.AddCardAndPlayer(p2, c2);
     trick.AddCardAndPlayer(p3, c3);
     trick.AddCardAndPlayer(p4, c4);
     trick.AddCardAndPlayer(p5, c5);
     Assert.AreEqual(p4.Name, trick.TheWinnerPlayer().Name);
 }
Esempio n. 4
0
 public void TheWinnerCardTest()
 {
     trick = new Trick();
     trick.AddCardAndPlayer(p1, c1);
     trick.AddCardAndPlayer(p2, c2);
     trick.AddCardAndPlayer(p3, c3);
     trick.AddCardAndPlayer(p4, c4);
     trick.AddCardAndPlayer(p5, c5);
     Assert.AreEqual(c4, trick.TheWinnerCard());
 }
Esempio n. 5
0
 public IPlayer Start(Prompt prompt, List <IPlayer> players, List <IRound> rounds, IPlayer picker, IBlind blind, ICard partnerCard)
 {
     foreach (IPlayer player in players)
     {
         CurrentPlayer = player;
         Trick.AddCardAndPlayer(player, player.PlayCard(prompt, rounds, picker, blind, partnerCard));
     }
     return(Trick.TheWinnerPlayer());
 }