private static OutgoingMessage CreateChooseTrumpfMessage(Trumpf trumpf) { return(new OutgoingMessage(MessageType.CHOOSE_TRUMPF) { Data = trumpf }); }
public void BeatsCard_forObeabe() { var lowerCard = new Card(Suit.CLUBS, 6); var higherCard = new Card(Suit.CLUBS, 8); var trumpf = new Trumpf(TrumpfMode.OBEABE); Assert.IsTrue(higherCard.BeatsCard(lowerCard, trumpf)); Assert.IsFalse(lowerCard.BeatsCard(higherCard, trumpf)); }
public void BeatsCard_trumpf_withOneTrumpfCard() { var trumpfCard = new Card(Suit.CLUBS, 6); var nonTrumpfCard = new Card(Suit.SPADES, 8); var trumpf = new Trumpf(TrumpfMode.TRUMPF, Suit.CLUBS); Assert.IsTrue(trumpfCard.BeatsCard(nonTrumpfCard, trumpf)); Assert.IsFalse(nonTrumpfCard.BeatsCard(trumpfCard, trumpf)); }
public void BeatsCard_trumpf_withTwoTrumpfCardOneOfThemNine() { var higherTrumpf = new Card(Suit.CLUBS, 9); var lowerTrumpf = new Card(Suit.CLUBS, 14); var trumpf = new Trumpf(TrumpfMode.TRUMPF, Suit.CLUBS); Assert.IsTrue(higherTrumpf.BeatsCard(lowerTrumpf, trumpf)); Assert.IsFalse(lowerTrumpf.BeatsCard(higherTrumpf, trumpf)); }
public void BeatsCard_trumpf_withNonTrumpfCards() { var lowerCard = new Card(Suit.CLUBS, 6); var higherCard = new Card(Suit.CLUBS, 8); var trumpf = new Trumpf(TrumpfMode.TRUMPF, Suit.HEARTS); Assert.IsTrue(higherCard.BeatsCard(lowerCard, trumpf)); Assert.IsFalse(lowerCard.BeatsCard(higherCard, trumpf)); }