Ejemplo 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());
        }
Ejemplo 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());
 }
Ejemplo 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);
 }
Ejemplo 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());
 }
Ejemplo 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());
 }