public void AllSameNonTrumpSuitGetWinningPlayerTest() { var trick = new Trick(new Hand(Players, Deck) { SpadesHaveBeenBroken = true }); trick.PlayCard(PlayerOne, new Card() { Rank = Rank.Seven, Suit = Suit.Diamonds }); trick.PlayCard(PlayerTwo, new Card() { Rank = Rank.Ten, Suit = Suit.Diamonds }); trick.PlayCard(PlayerThree, new Card() { Rank = Rank.Two, Suit = Suit.Diamonds }); trick.PlayCard(PlayerFour, new Card() { Rank = Rank.Nine, Suit = Suit.Diamonds }); var winner = trick.GetWinningPlayer(); Assert.AreEqual(PlayerTwo, winner); }
public void AllTrumpsGetWinningPlayerTest() { var trick = new Trick(new Hand(Players, Deck) { SpadesHaveBeenBroken = true }); trick.PlayCard(PlayerTwo, new Card() { Rank = Rank.King, Suit = Suit.Spades }); trick.PlayCard(PlayerThree, new Card() { Rank = Rank.Queen, Suit = Suit.Spades }); trick.PlayCard(PlayerFour, new Card() { Rank = Rank.Jack, Suit = Suit.Spades }); trick.PlayCard(PlayerOne, new Card() { Rank = Rank.Ace, Suit = Suit.Spades }); var winner = trick.GetWinningPlayer(); Assert.AreEqual(PlayerOne, winner); }