Exemple #1
0
 private static OutgoingMessage CreateChooseTrumpfMessage(Trumpf trumpf)
 {
     return(new OutgoingMessage(MessageType.CHOOSE_TRUMPF)
     {
         Data = trumpf
     });
 }
Exemple #2
0
        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));
        }
Exemple #3
0
        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));
        }
Exemple #4
0
        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));
        }
Exemple #5
0
        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));
        }