public void LeadingCardTest() { trick = new Trick(); trick.AddCardAndPlayer(p1, c1); trick.AddCardAndPlayer(p2, c2); Assert.AreEqual(c1, trick.LeadingCard()); Assert.AreNotEqual(c2, trick.LeadingCard()); }
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()); }
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); }
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()); }
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()); }